Latest 1.0.1
Homepage https://github.com/DaoPinWong/DPPageViewController
License MIT
Platforms ios 8.0
Dependencies Masonry
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

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

pod "DPPageViewController"

Usage

Quick to use

#import "DPPageViewController.h"

DPPageViewController *pagevc = [[DPPageViewController alloc] initWithTitle:@"Page View Controller" viewControllers:@[vc1,vc2,vc3,vc4,vc5]];
[self.navigationController pushViewController:pagevc animated:YES];

property


/// 中间的view使用时直接赋值
@property (nonatomic, strong) UIView *middleView;

/// 底部的view使用时直接赋值
@property (nonatomic, strong) UIView *bottomView;

/// 当前页的索引
@property (nonatomic, assign) NSInteger displayIndex;

/// 当前显示的view
@property (nonatomic, strong) UIView *displayView;

@property (nonatomic, copy, readonly) NSArray *viewControllers;

/// 普通的颜色
@property (nonatomic, strong) UIColor *commonColor;

/// 选中的颜色
@property (nonatomic, strong) UIColor *selectColor;

/// title字体大小
@property (nonatomic, assign) CGFloat titleSize;

/// 选中的title放大倍数 (默认1)
@property (nonatomic, assign) CGFloat selectTitleZoomMultiple;

More


    pagevc.itemHeight = 40;
    pagevc.minItemWidth = 70;
    pagevc.selectTitleZoomMultiple = 1.5;
    pagevc.commonColor = [UIColor blueColor];
    pagevc.selectColor = [UIColor redColor];

    UIView *middleView = [UIView new];
    middleView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 50);
    UILabel *middleLabel = [UILabel new];
    middleLabel.textAlignment = NSTextAlignmentCenter;
    middleLabel.text = @"Middle View";
    [middleView addSubview:middleLabel];
    middleLabel.frame = middleView.bounds;
    pagevc.middleView = middleView;

    UIView *bottomView = [UIView new];
    bottomView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 50);
    UILabel *bottomLabel = [UILabel new];
    bottomLabel.textAlignment = NSTextAlignmentCenter;
    bottomLabel.text = @"Bottom View";
    [bottomView addSubview:bottomLabel];
    bottomLabel.frame = bottomView.bounds;
    pagevc.bottomView = bottomView;

Author

dpwong, [email protected]

License

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

Latest podspec

{
    "name": "DPPageViewController",
    "version": "1.0.1",
    "summary": "u4e00u4e2au7c7bu4f3cu7f51u6613u65b0u95fbu9875u9762u5207u6362u7684u63a7u4ef6.",
    "description": "u4e00u4e2au7c7bu4f3cu7f51u6613u65b0u95fbu9875u9762u5207u6362u7684u63a7u4ef6.u7528u4e24u884cu4ee3u7801u5c31u53efu4ee5u5b9eu73b0nnDPPageViewController *pagevc = [[DPPageViewController alloc] initWithTitle:@"Page View Controller" viewControllers:@[vc1,vc2,vc3,vc4,vc5]];n[self.navigationController pushViewController:pagevc animated:YES];",
    "homepage": "https://github.com/DaoPinWong/DPPageViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "dpwong": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DaoPinWong/DPPageViewController.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "DPPageViewController/Classes/**/*",
    "dependencies": {
        "Masonry": [
            "1.0.2"
        ]
    }
}

Pin It on Pinterest

Share This