- Advanced segmentControl which supports infinite items. Scrollable horizontally only. You could replace
UISegmentControl
with VisionSlideSegmentView directly. - 可在水平方向上无限延长的分段选择器,可直接替代
UISegmentControl
使用。
- Just drag
VisionControl
folder into your project - 将
VisionControl
文件夹拖入你的項目
#import "VisionSlideSegmentView.h"
VisionSlideSegmentView *segment = [[VisionSlideSegmentView alloc]
initWithFrame:CGRectMake(0, 0, 200, 40)];
segment.dataArray = dataArray;
segment.delegate = self;
[self.view addSubview:segment];
#pragma mark - delegate
- (void)visionSlideSegmentView:(VisionSlideSegmentView *)view selectedAtIndex:(NSInteger)index{
NSLog(@"Index:%zi",index);
}
- Support infinite items
SizeToFit
automatically- Enable scroll automatically
- 无限分段数
- 自适应文本长度
- 自动启用/禁用水平滚动
- iOS 6 or later. Requires ARC ,support iPhone/iPad.
- iOS 6及以上系统可使用. 本控件纯ARC,支持iPhone/iPad横竖屏
Please create a issue if you have any questions. Welcome to visit my Blog
All source code is licensed under the MIT License.