It's a wrapped UIScrollView with delegate on itself which
- adjusts subviews' frame accordingly when rotated
- Reuse subviews so that we don't have to hold all subviews all the time
First, add files under "EGPagedScrollView" to your project and include "EGPagedScrollView.h".
Then create an instance of EGPagedScrollView, add it to your view and set the data which should comforms to EGPagedScrollViewDataSource.
EGPagedScrollView *pagedScrollView = [[EGPagedScrollView alloc] initWithFrame: self.view.bounds]];
pagedScrollView.dataSource = self;
Your dataSource should implement required methods as below:
- (NSUInteger) numberOfItemsInPagedScrollView: (EGPagedScrollView *)pagedScrollViewController;
- (UIView *) pagedScrollView: (EGPagedScrollView *)pagedScrollView viewForPageAtIndex: (NSUInteger) index;
And that's it, for the other details just refer to the example project.
Licensed under MIT.