mindsnacks / MSPageViewController

Create UIPageViewControllers using only storyboards
MIT License
89 stars 23 forks source link

Infinite scrolling #7

Closed yousafk closed 10 years ago

yousafk commented 10 years ago

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 the MSPageViewController inherited class before the [super viewDidLoad] method.

NachoSoto commented 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.

yousafk commented 10 years ago

Should I create a subclass of that version or drop it?

NachoSoto commented 10 years ago

I'm just hesitant to include such specific functionality in this class. It's meant to be simple and reusable.

yousafk commented 10 years ago

Alright, that does sound reasonable and its best to keep it simple.