MERPageViewController 1.1.0

MERPageViewController 1.1.0

Maintained by Mervin1024.



  • By
  • Mervin1024

MERPageViewController

Version License Platform

Custom horizontal slide page view controller.

一款自定义的横滑样式分页控制器

ScreenShots

Support

Objective-C & iOS 8+.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

self.pageViewController = [[MERPageViewController alloc] init];
self.pageViewController.dataSource = self;
self.pageViewController.delegate = self;
[self addChildViewController:self.pageViewController];
[self.view addSubview:self.pageViewController.view];
self.pageViewController.view.frame = [UIScreen mainScreen].bounds;

Required dataSource

#pragma mark ----------------- MERPageViewControllerDataSource -----------------

- (nonnull UIViewController *)mer_pageViewController:(nonnull MERPageViewController *)pageViewController controllerAtIndex:(NSInteger)index {
return [self.pageControllers objectAtIndex:index];
}

- (NSInteger)numberOfControllersInPageViewController:(nonnull MERPageViewController *)pageViewController {
return self.pageControllers.count;
}

Installation

MERPageViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MERPageViewController'

Author

👤 Mervin1024 [email protected]

License

MERPageViewController is available under the MIT license. See the LICENSE file for more info.