Latest 1.0.0
Homepage https://github.com/miaoqiu/QMSegmenView
License MIT
Platforms ios 5.0, requires ARC
Frameworks Foundation, UIKit
Authors

Custom segmentedControl

Preview

view show

Install

支出Pod安装

pod ‘QMSegmenView’

Example

- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"Segmengts";
self.automaticallyAdjustsScrollViewInsets=NO;
self.view.backgroundColor = [UIColor redColor];
NSMutableArray *array=[NSMutableArray array];
for (int i =0; i<3; i++) {
UIViewController *view=[[UIViewController alloc] init];
if (i==0) {
view.view.backgroundColor=[UIColor brownColor];
UIImageView *image = [[UIImageView alloc] init];
image.frame = CGRectMake(10,10, MainScreen_W-20, MainScreen_H-200);
[image setImage:[UIImage imageNamed:@"0"]];
[view.view addSubview:image];
}if (i==1) {
view.view.backgroundColor=[UIColor blackColor];
UIImageView *image = [[UIImageView alloc] init];
image.frame = CGRectMake(10,10, MainScreen_W-20, MainScreen_H-200);
[image setImage:[UIImage imageNamed:@"2"]];
[view.view addSubview:image];
}if(i==2){
view.view.backgroundColor=[UIColor yellowColor];
UIImageView *image = [[UIImageView alloc] init];
image.frame = CGRectMake(10,10, MainScreen_W-20, MainScreen_H-200);
[image setImage:[UIImage imageNamed:@"1"]];
[view.view addSubview:image];
}
[array addObject:view];
}

QMSegmentScrollView *scView=[[QMSegmentScrollView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height-64) titleArray:@[@"淼淼淼",@"沝沝沝",@"水水水"] contentViewArray:array];

[self.view addSubview:scView];

}

Latest podspec

{
    "name": "QMSegmenView",
    "version": "1.0.0",
    "summary": "A custom segmentView used on iOS",
    "description": "It is a custom segmentView used on iOS, which implement by objective-c",
    "homepage": "https://github.com/miaoqiu/QMSegmenView",
    "license": "MIT",
    "authors": {
        "qiumaio": "[email protected]"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/miaoqiu/QMSegmenView.git",
        "tag": "1.0.0"
    },
    "source_files": "QMSegment/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This