Skip to content

Commit

Permalink
Modified calls to invalidateIntrinsicContentSize to ensure backwards …
Browse files Browse the repository at this point in the history
…compatibility with iOS 5.0.
  • Loading branch information
idpaterson committed Oct 24, 2013
1 parent a9ef585 commit 3f06af2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SMPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ - (void)_updateMeasuredIndicatorSizes
[self _updateMeasuredIndicatorSizeWithSize:self.pageIndicatorMaskImage.size];
}

[self invalidateIntrinsicContentSize];
if ([self respondsToSelector:@selector(invalidateIntrinsicContentSize)]) {
[self invalidateIntrinsicContentSize];
}
}


Expand Down Expand Up @@ -566,7 +568,9 @@ - (void)setNumberOfPages:(NSInteger)numberOfPages
self.accessibilityPageControl.numberOfPages = numberOfPages;

_numberOfPages = MAX(0, numberOfPages);
[self invalidateIntrinsicContentSize];
if ([self respondsToSelector:@selector(invalidateIntrinsicContentSize)]) {
[self invalidateIntrinsicContentSize];
}
[self updateAccessibilityValue];
[self setNeedsDisplay];
}
Expand Down

0 comments on commit 3f06af2

Please sign in to comment.