Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Example/SMPageControl/SMViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ - (void)viewDidLoad

- (void)pageControl:(id)sender
{
NSLog(@"Current Page (UIPageControl) : %i", self.pageControl.currentPage);
NSLog(@"Current Page (UIPageControl) : %li", (long)self.pageControl.currentPage);
}

- (void)spacePageControl:(SMPageControl *)sender
{
NSLog(@"Current Page (SMPageControl): %i", sender.currentPage);
NSLog(@"Current Page (SMPageControl): %li", (long)sender.currentPage);
}

@end
5 changes: 3 additions & 2 deletions SMPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ - (CGSize)sizeThatFits:(CGSize)size
- (CGSize)intrinsicContentSize
{
if (_numberOfPages < 1 || (_numberOfPages < 2 && _hidesForSinglePage)) {
return CGSizeMake(UIViewNoIntrinsicMetric, 0.0f);
return CGSizeZero;
}
CGSize intrinsicContentSize = CGSizeMake(UIViewNoIntrinsicMetric, MAX(_measuredIndicatorHeight, _minHeight));
CGFloat intrinsicContentWidth = [self sizeForNumberOfPages:self.numberOfPages].width;
CGSize intrinsicContentSize = CGSizeMake(intrinsicContentWidth, MAX(_measuredIndicatorHeight, _minHeight));
return intrinsicContentSize;
}

Expand Down