Latest 0.5.0
Homepage https://github.com/wing3501/STSegmentView
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

GitHub license
CocoaPods Compatible

STSegmentView ios视觉差分段选择器,带滑块,支持与外层scrollview同步滑动

视觉差原理参考:
https://github.com/lizelu/ZLCustomeSegmentControlView

image

STSegmentView的使用

在需要用到的地方 #import <STSegmentView.h>

简单使用

STSegmentView *exampleSegmentView = [[STSegmentView alloc]initWithFrame:CGRectMake(0, 30, self.view.bounds.size.width, 50)];
exampleSegmentView.titleArray = @[@"test1",@"test2",@"test3",@"test4"];
exampleSegmentView.selectedBackgroundColor = [UIColor redColor];
exampleSegmentView.selectedBgViewCornerRadius = 25;
[self.view addSubview: exampleSegmentView];

联动scrollview

exampleSegmentView.outScrollView = scrollView;

更多属性详见example

安装

  1. CocoaPods安装:
    pod 'STSegmentView' 
  2. 下载ZIP包,将STSegmentView资源文件拖到工程中。

其他

为了不影响您项目中导入的其他第三方库,本库没有导入任何其他的第三方内容,可以放心使用。

  • 如果您有什么建议可以Issues我,谢谢
  • 后续我会持续更新,为它添加更多的功能,欢迎star :)

Latest podspec

{
    "name": "STSegmentView",
    "version": "0.5.0",
    "summary": "SegmentView for ios.",
    "description": "a SegmentView for ios.",
    "homepage": "https://github.com/wing3501/STSegmentView",
    "license": "MIT",
    "authors": {
        "styf": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/wing3501/STSegmentView.git",
        "tag": "0.5.0"
    },
    "source_files": [
        "STSegmentView",
        "STSegmentView/**/*.{h,m}"
    ],
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This