Latest 1.0.2
Homepage https://github.com/HaiTeng-Wang/PageSegment
License MIT
Platforms ios 8.0, requires ARC
Authors

PageSegment

Language

Platform iOSCocoaPods compatible
License: MIT

基于PagerTab基础上进行修改。

原贡献者,貌似消失于Github界,此控件也没有持续更新。所有放到这里希望大家可以一起pull requests

文件,代码少,易于自己修改成适合自己项目的工程控件。TabBar可显示小红点。


效果图

多个BarItem

Features

  • 容器视图控制器管理页面,左右滑动切换页面控制器
  • 可配置TabBar,支持多个BarItem,TabBar支持小红点显示
  • 支持页面边缘右滑返回

Requirements

  • iOS 8+

Installation with CocoaPods

Podfile

platform :ios, '8.0'

target 'TargetName' do
pod 'PageSegmentView', '~> 1.0.2'
end

Then

$ pod install

Use

init

- (PageSegmentView *)segmentView {
    if (!_segmentView) {
        self.segmentView = [[PageSegmentView alloc]initWithFrame:CGRectMake(0,20,self.view.width,self.view.height - 20)];
        [self.view addSubview:_segmentView];
    }
    return _segmentView;
}

config

self.segmentView.delegate = self;
//可自定义背景色和tab button的文字颜色等
//开始构建UI
[_segmentView buildUI];
//显示红点,点击消失
[_segmentView showRedDotWithIndex:0];

delegate

#pragma mark - PageSegmentView Delegate

- (NSUInteger)numberOfPagers:(PageSegmentView *)view {
    return [_allVC count];
}
- (UIViewController *)pagerViewOfPagers:(PageSegmentView *)view indexOfPagers:(NSUInteger)number {
    return _allVC[number];
}

- (void)whenSelectOnPager:(NSUInteger)number {
    NSLog(@"页面 %lu",(unsigned long)number);
}

Contribution

Discussion and pull requests are welcomed Correcting English grammar is welcomed, too.

Contact me

License

RxTodo is under MIT license. See the LICENSE for more info.

Latest podspec

{
    "name": "PageSegmentView",
    "version": "1.0.2",
    "summary": "u9875u9762u6ed1u52a8u8f6cu6362u5668",
    "description": "u5de6u53f3u6ed1u52a8u5207u6362u9875u9762uff0cTabBaru652fu6301u5c0fu7ea2u70b9u663eu793au3002",
    "homepage": "https://github.com/HaiTeng-Wang/PageSegment",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Hunter": "https://HaiTeng-Wang.github.io"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/HaiTeng-Wang/PageSegment.git",
        "tag": "1.0.2"
    },
    "source_files": "PageSegment/PageSegment/PageSegmentView/*.{h,m}",
    "resources": "PageSegment/PageSegment/PageSegmentView/PageSegmentView.bundle",
    "requires_arc": true
}

Pin It on Pinterest

Share This