Latest 1.1.5
Homepage https://github.com/RocketsChen/CDDPagerController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

A very useful father-son controller small frame.

Language

Objective-C

Requirements

  • Xcode 8+

Usage

  • You can do that.
#pragma mark - LazyLoad
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

//    self.selectIndex = 3; //default option
}

#pragma mark - LifeCyle
- (void)viewDidLoad {

    [super viewDidLoad];

    [self setUpAllChildViewController];

    [self setUpDisplayStyle:^(UIColor *__autoreleasing *titleScrollViewBgColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIColor *__autoreleasing *proColor, UIFont *__autoreleasing *titleFont, CGFloat *titleButtonWidth, BOOL *isShowPregressView, BOOL *isOpenStretch, BOOL *isOpenShade) {
        *titleScrollViewBgColor = [UIColor whiteColor]; //View background color
        *norColor = [UIColor darkGrayColor];            //Unselected color (the font color is black by default)
        *selColor = [UIColor orangeColor];              //Highlight the color (the font color is red by default)
        *proColor = [UIColor purpleColor];              //Scrollbar color (by default the color of the title is selected)
        *titleFont = [UIFont systemFontOfSize:16];      //FontSize (default fontSize is 15)

        *titleButtonWidth = 100;                        //Width of the title button (with default)

        /*
         The following BOOL values are NO.
         */
        *isShowPregressView = YES;                      //Whether to open the lower Pregress indicator under the heading.器
        *isOpenStretch = YES;                           //Whether to open indicator stretch effect.
        *isOpenShade = YES;                             //whether to open the font gradient.
    }];

//    [self setUpTitleScale:^(CGFloat *titleScale) { //The titleScale range is between 0 and 1 <0 or > 1, and the default is not resized by default. TitleScale opens the zoom, and the default is closed.
//        *titleScale = 0.1;
//    }];
//
//    [self setUpProgressAttribute:^(CGFloat *progressLength, CGFloat *progressHeight, CGFloat *bottomDistance) {//ProgressLength sets the length of the bottom progress indicator, with the default value of 56 progressHeight default height of the button's width (and no greater than 10)
//        *progressLength = 40;
//        *progressHeight = 5;
//    }];

//    [self setUpTopTitleViewAttribute:^(CGFloat *topDistance, CGFloat *titleViewHeight) {
//        *topDistance = 200;
//    }];
}

#pragma mark - Add all childControllers.
- (void)setUpAllChildViewController
{
    NSArray *titles = @[@"text01",@"text02",@"text03",@"text04",@"text05"];
    for (NSInteger i = 0; i < titles.count; i++) {
        UIViewController *vc = [UIViewController new];
        vc.title = titles[i];
        vc.view.backgroundColor = RandColor; //Random color
        [self addChildViewController:vc];
    }
}

Installation

Manually:

  • Drag all source files(CDDPagerController) under folder Extension to your project.
  • Import the header(DCPageKit.h) file in the AppDelegate.
  • A method is called

CocoaPods:

  • Installation with CocoaPods:pod CDDPagerController

Swift version:

  • Waiting for development

Agreement

Latest podspec

{
    "name": "CDDPagerController",
    "version": "1.1.5",
    "summary": "A very useful father-son controller small frame",
    "description": "CDDKit is a very useful wrapper class",
    "homepage": "https://github.com/RocketsChen/CDDPagerController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "RcoketsChen": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/RocketsChen/CDDPagerController.git",
        "tag": "1.1.5"
    },
    "source_files": [
        "CDDPagerController",
        "CDDPagerController/**/*"
    ],
    "requires_arc": true,
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This