Skip to content

Commit

Permalink
-[ASPagerNode currentPageIndex] to use pageSize instead of bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhuy committed Aug 22, 2017
1 parent 326849b commit 1243609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/ASPagerNode.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ - (void)didLoad

- (NSInteger)currentPageIndex
{
return (self.view.contentOffset.x / CGRectGetWidth(self.view.bounds));
return (self.view.contentOffset.x / [self pageSize].width);
}

- (CGSize)pageSize
Expand Down

0 comments on commit 1243609

Please sign in to comment.