CocoaPods trunk is moving to be read-only. Read more on the blog, there are 3 months to go.

HTPageControllerView 0.0.4

HTPageControllerView 0.0.4

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2017

Maintained by Zeyu Tao.



  • By
  • netease

HTPageControllerView管理多个Controller,使得他们可以以整页的方式左右滚动。

Mou icon

特性

  • 可配置Controller的最大缓存个数
  • 在快速滑动Controller来不及显示时,可定制Controller的占位控件
  • 接口类似UITableView,提供HTPageControllerViewDataSource和HTPageControllerViewDataDelegate

用法

HTPageControllerView使用类似于UITableView:

  1. 创建HTPageControllerView

    _pageControllerView = [[HTPageControllerView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
    _pageControllerView.pageDataSource = self;
    _pageControllerView.pageDelegate = self;
    [self.view addSubView:_pageControllerView];
    
  2. 实现协议HTPageControllerViewDataSource

    - (NSUInteger)numberOfControllersInPageControllerView
    {
    	return 4;
    }
    
    - (UIViewController*)pageControllerView:(HTPageControllerView*)pageControllerView viewControllerForIndex:(NSUInteger)index
    {
    	UIViewController *vc = [[TestPageViewController alloc] initWithNibName:nil bundle:nil withIndex:index];
    	return vc;
    }
    

安装

系统要求

该项目最低支持iOS 7.0Xcode 7.0

许可证

HTPageControllerView,详情见LICENSE文件。