pag

PageSegmentView

左右滑动切换页面,TabBar支持小红点显示。

Showing:

Popularity

Downloads/wk

0

GitHub Stars

88

Maintenance

Last Commit

3yrs ago

Contributors

4

Package

Dependencies

0

License

MIT

Categories

Readme

PageSegment

Language

Platform iOS CocoaPods 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.6'
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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100