Skip to content
Open
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
5 changes: 4 additions & 1 deletion SYPaginator/SYPaginatorView.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ @implementation SYPaginatorView {
NSMutableDictionary *_reuseablePages;
BOOL _pageControlUsed;
BOOL _pageSetViaPublicMethod;
BOOL _pageContentNeedsRefresh;
}

@synthesize scrollView = _scrollView;
Expand Down Expand Up @@ -155,6 +156,7 @@ - (void)willMoveToSuperview:(UIView *)newSuperview {
#pragma mark - Managing data

- (void)reloadData {
_pageContentNeedsRefresh = YES;
[self reloadDataRemovingCurrentPage:YES];
}

Expand Down Expand Up @@ -402,7 +404,7 @@ - (void)_reusePages {


- (void)_setCurrentPageIndex:(NSInteger)targetPage animated:(BOOL)animated scroll:(BOOL)scroll forcePreload:(BOOL)forcePreload {
if (_currentPageIndex == targetPage && _pageSetViaPublicMethod != YES) {
if (_currentPageIndex == targetPage && _pageSetViaPublicMethod != YES && _pageContentNeedsRefresh != YES) {
return;
}

Expand Down Expand Up @@ -449,6 +451,7 @@ - (void)_setCurrentPageIndex:(NSInteger)targetPage animated:(BOOL)animated scrol
}

_pageSetViaPublicMethod = NO;
_pageContentNeedsRefresh = NO;
}


Expand Down