Skip to content

A paged scroll view takes care about rotation and subview reuse.

License

Notifications You must be signed in to change notification settings

egistli/EGPagedScrollView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EGPagedScrollView

It's a wrapped UIScrollView with delegate on itself which

  1. adjusts subviews' frame accordingly when rotated
  2. Reuse subviews so that we don't have to hold all subviews all the time

Getting Start

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.

License

Licensed under MIT.

About

A paged scroll view takes care about rotation and subview reuse.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published