Skip to content

Commit

Permalink
fix the bug of page index is bigger than the subview count
Browse files Browse the repository at this point in the history
  • Loading branch information
nbfuhao committed Sep 16, 2015
1 parent d3a2e62 commit 59a5b79
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ -(int)getCurrentDisplayedPage{
while (currentXPosition <= bottomScrollView.contentOffset.x && currentXPosition < bottomScrollView.contentSize.width){
currentXPosition += [self getWidthOfPage:page];

if (currentXPosition <= bottomScrollView.contentOffset.x){
if (currentXPosition <= bottomScrollView.contentOffset.x && page < [bottomScrollView.subviews count]-1){
page++;
}
}
Expand Down

0 comments on commit 59a5b79

Please sign in to comment.