Latest 0.2.1
Homepage https://github.com/drinking/DKTabView
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Demo

Platform

Usage

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

Here’s how to create a custom tab view.

    DKTabView *tabView = [[DKTabView alloc] initWithFrame:CGRectMake(0, 120, CGRectGetWidth(self.view.frame), 44)];
    tabView.layoutStyle = DKTabFillParent;
    tabView.cursorStyle = DKTabCursorUnderneath;
    tabView.backgroundColor = [UIColor whiteColor];
    tabView.cursorView.backgroundColor = [UIColor blackColor];

    // This method should be invoked at the last step
    [tabView buildTabViewWithItems:^NSArray * {
        NSArray * titles = @[@"NEWS", @"CULTURE", @"BOOKS", @"BUSINESS"];
        NSMutableArray *items = [[NSMutableArray alloc] init];
        for (NSString *title in titles) {
            UILabel *label = [[UILabel alloc] init];
            label.text = title;
            label.font = [UIFont systemFontOfSize:14];
            label.textColor = [UIColor blackColor];
            label.textAlignment = NSTextAlignmentCenter;
            [items addObject:label];
        }
        return items;
    }];

    [self.view addSubview:tabView];

Installation

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

pod "DKTabView"

Author

drinking, [email protected]

License

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

Latest podspec

{
    "name": "DKTabView",
    "version": "0.2.1",
    "summary": "A custom TabView.",
    "description": "DKTabView is a class designed to simplify the implementation of various types of tab view.You can customize your TabItems and animate cursor between them.For more details to see the Example.",
    "homepage": "https://github.com/drinking/DKTabView",
    "license": "MIT",
    "authors": {
        "drinking": "[email protected]"
    },
    "source": {
        "git": "https://github.com/drinking/DKTabView.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*"
}

Pin It on Pinterest

Share This