Closed yousafk closed 10 years ago
I'm actually having second thoughts on this. This can be easily implemented in a subclass of MSPageViewController
so there's no need to include it in the base implementation.
Should I create a subclass of that version or drop it?
I'm just hesitant to include such specific functionality in this class. It's meant to be simple and reusable.
Alright, that does sound reasonable and its best to keep it simple.
I added the property
infiniteScrolling
to the MSPageViewController and changed the- (UIViewController *)viewControllerAtIndex:(NSInteger)index
method to work with it. This way, if you scroll continously and reach the last page, it goes to the first and vice versa. If it is not set, it is automatically NO. If you want continous scrolling, this boolean must be set in the-(void)viewDidLoad
of theMSPageViewController
inherited class before the[super viewDidLoad]
method.