TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | CC |
ReleasedLast Release | Dec 2014 |
Maintained by Levi Brown.
A container UIViewController providing paginated scrolling between configured view controllers. Similar to UIPageViewController, but with added control and feedback.
If you're using CocoPods it's as simple as adding this to your Podfile
:
pod 'GRKPageViewController'
otherwise, simply add GRKPageViewController.h
and GRKPageViewController.m
to your
project.
GRKPageViewController
follows the familiar data source and delegate pattern. To
configure, register your object as the data source and optionally register your object as
the delegate.
Your data source (GRKPageViewControllerDataSource
) must implement:
- (NSUInteger)pageCountForPageViewController:(GRKPageViewController *)controller;
- (UIViewController *)viewControllerForIndex:(NSUInteger)index forPageViewController:(GRKPageViewController *)controller;
to specify the number of pages and provide the corresponding view controller objects.
Optionally your delegate (GRKPageViewControllerDelegate
) can implement either of the
following to get feedback about index changes:
- (void)changedIndexOffset:(CGFloat)indexOffset forPageViewController:(GRKPageViewController *)controller;
- (void)changedIndex:(NSUInteger)index forPageViewController:(GRKPageViewController *)controller;
Additional documentation is available in GRKPageViewController.h
and example usage can
be found in the GRKPageViewControllerTestApp source.
A professional iOS engineer by day, my name is Levi Brown. Authoring a technical blog grokin.gs, I am reachable via:
Twitter @levigroker
App.net @levigroker
Email [email protected]
Your constructive comments and feedback are always welcome.