Latest 0.3.0
Homepage https://github.com/studyYF/YFPageView-s
License MIT
Platforms ios 8.0
Dependencies YFBase/Frame
Authors

CI Status
Version
License
Platform

Example

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

Requirements

Installation

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

pod "YFPageView"

Usage

1.引用头文件 #import "YFPageViewController.h"
2.

//创建控制器,并添加为当前控制器的子控制器
self.pageViewController = [[YFPageViewController alloc] init];
[self addChildViewController:self.pageViewController];

//设置view的frame
self.pageViewController.view.frame = self.view.bounds;
//设置segmentView的frame
self.pageViewController.segmentView.frame = CGRectMake(0, 0, yfWidth, 44);
[self.view addSubview:self.pageViewController.view];

//设置segment的参数
///链式编程调用,类似masonry
[self.pageViewController.segmentView updateConfig:^(YFSegmentViewConfig *config) {
//链式设置属性
config.normalColor([UIColor lightGrayColor]).seletcedColor([UIColor redColor]).line([UIColor redColor]).font(14).viewBackColor([UIColor whiteColor]);
//普通设置属性
//        config.titleButtonColorNormal = [UIColor lightGrayColor];
//        config.titleButtonColorSeletced = [UIColor orangeColor];
//        config.lineColor = [UIColor orangeColor];
//        config.buttonfont = [UIFont systemFontOfSize:14];
}];

//设置每个item的控制器
NSMutableArray * vcArray = [NSMutableArray array];
for (int i = 0; i < 5; i ++) {
UIViewController * vc = [UIViewController new];
vc.view.backgroundColor = RandomColor;
[vcArray addObject:vc];
}
//设置item的标题
NSArray * titleArray = @[@"你啊后",@"再见",@"考试",@"回家",@"总决赛"];
//设置控件
[self.pageViewController setContentWithTitles:titleArray vcs:vcArray];

License

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

Latest podspec

{
    "name": "YFPageView",
    "version": "0.3.0",
    "summary": "YFPageView.",
    "description": "u7c7bu4f3cu4e8eu4ecau65e5u5934u6761u7684u9876u90e8u6ed1u52a8u63a7u4ef6",
    "homepage": "https://github.com/studyYF/YFPageView-s",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/studyYF/YFPageView-s.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "YFPageView/Classes/**/*",
    "dependencies": {
        "YFBase/Frame": []
    }
}

Pin It on Pinterest

Share This