PXRotatorView 0.5.8

PXRotatorView 0.5.8

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2015年11月

Drinking pan 维护。



  • 作者:
  • drinking

屏幕截图

screenshot

使用方法

要运行示例项目,请首先克隆仓库,然后从 Example 目录中运行 pod install

首先,您需要从 PXRotatorBaseViewModel 子类化并实现您自定义视图的位置上的 carousel:viewForItemAtIndex:reusingView: 方法。

然后创建一个 viewModel 并设置您的数据源。

最后创建一个 rotatorView 并将其绑定到您的 viewModel。

您可以为 rotatorView 添加自定义的分页控件。我已经实现了一个,您可以修改它或自己编写一个。

    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];

要求

iciaros 和 ReactiveCocoa

安装

PXRotatorView 通过 CocoaPods 提供。要安装,只需将以下行添加到您的 Podfile 即可

pod "PXRotatorView"

作者

drinking, [email protected]

许可证

PXRotatorView 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。