Latest 0.0.4
Homepage https://github.com/NEYouFan/ht-pagecontrollerview-ios
License MIT
Platforms ios 7.0
Dependencies HTCommonUtility
Authors

HTPageControllerView

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

安装

CocoaPods

  1. pod 'HTPageControllerView' , :git=>'https://g.hz.netease.com/HTIOSUI/HTPageControllerView.git'
  2. pod installpod update
  3. #import "HTPageControllerView.h"

系统要求

该项目最低支持iOS 7.0Xcode 7.0

许可证

HTPageControllerView,详情见LICENSE文件。

Latest podspec

{
    "name": "HTPageControllerView",
    "version": "0.0.4",
    "summary": "u7f51u6613u6807u51c6u5316u4e4b HTPageControllerView.",
    "description": "A longer description of HTPageControllerView in Markdown format.",
    "homepage": "https://github.com/NEYouFan/ht-pagecontrollerview-ios",
    "license": "MIT",
    "authors": {
        "netease": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/NEYouFan/ht-pagecontrollerview-ios.git",
        "tag": "0.0.4"
    },
    "source_files": "HTPageControllerView/*.{h,m}",
    "dependencies": {
        "HTCommonUtility": [
            "~>0.0.1"
        ]
    }
}

Pin It on Pinterest

Share This