TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
DVANestedPageViewController is a clean and easy-to-use wrapper around UIPageViewController
Just add this to your Podfile
pod 'DVANestedPageViewController'
DVANestedPageViewController.h/m
, DVAVerticalPageViewController.h/m
and UIViewController+Notifications.h/m
to your project.(see sample Xcode project using storyboard in /NestedPageViewController
)
Add a DVANestedPageViewController instance as a container view controller (by code or storyboard) and implement the following methods for the dataSource and delegate:
@protocol DVANestedPageViewControllerDataSource <NSObject>
- (NSUInteger)nestedPageViewController:(DVANestedPageViewController *)nestedPageViewController numberOfViewControllersAtSection:(NSUInteger)section;
- (UIViewController *)nestedPageViewController:(DVANestedPageViewController *)nestedPageViewController viewControllerAtIndexPath:(NSIndexPath *)indexPath;
@optional
- (NSUInteger)nestedPageViewControllerNumberOfSections:(DVANestedPageViewController *)nestedPageViewController; // 1 by default
@end
@protocol DVANestedPageViewControllerDelegate <NSObject>
@optional
- (void)nestedPageViewController:(DVANestedPageViewController *)nestedPageViewController viewControllerWillAppear:(UIViewController *)viewController atIndexPath:(NSIndexPath *)indexPath;
- (void)nestedPageViewController:(DVANestedPageViewController *)nestedPageViewController viewControllerDidAppear:(UIViewController *)viewController atIndexPath:(NSIndexPath *)indexPath;
- (void)nestedPageViewController:(DVANestedPageViewController *)nestedPageViewController viewControllerWillDisappear:(UIViewController *)viewController atIndexPath:(NSIndexPath *)indexPath;
- (void)nestedPageViewController:(DVANestedPageViewController *)nestedPageViewController viewControllerDidDisappear:(UIViewController *)viewController atIndexPath:(NSIndexPath *)indexPath;
@end
DVANestedPageViewController is brought to you by Miguel Ferrando. Contributions are more than welcome. If you're using DVANestedPageViewController in your project, let me know!.