Created
February 25, 2014 01:49
-
-
Save amster/9201087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming again pageViewController.viewControllers returns the | |
// NSArray of UIViewControllers and the object at index 0 is the | |
// current view controller---which has a property idx indicating | |
// the current page. | |
- (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController { | |
int currentPage = [[pageViewController.viewControllers objectAtIndex:0] idx]; | |
return currentPage; | |
} | |
// MAX_PAGES is the total # of pages. | |
- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController { | |
return MAX_PAGES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment