PXRotatorView 0.5.8

PXRotatorView 0.5.8

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2015

Maintained by Drinking pan.



  • By
  • drinking

ScreenShot

screenshot

Usage

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

First you need to subclass PXRotatorBaseViewModel and implement carousel:viewForItemAtIndex:reusingView: method in where you customize your own view.

Then create a viewModel and set your data source.

Finally create a rotatorView and bind to your viewModel.

You may add a custom pageControl to your rotatorView. I implement one, you can modify it or write your own.

    DKRotatorDemoViewModel *viewModel = [DKRotatorDemoViewModel new];
    viewModel.displayItems = [@[@"Hello",@"Nice",@"to",@"meet",@"you!"] mutableCopy];

    PXRotatorView *rotatorView = [[PXRotatorView alloc] initWithFrame:self.view.frame];
    rotatorView.interval = 1;
    [self.view addSubview:rotatorView];

    [rotatorView bindViewModel:self.viewModel];
    [rotatorView addDefaultPageControl];
    [rotatorView updatePageControl];

Requirements

iCarousel and ReactiveCocoa

Installation

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

pod "PXRotatorView"

Author

drinking, [email protected]

License

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