一、分段控件
1、 UISegmentedControl
作用:分段控件,页面的切换等。
2、示例代码
NSArray *items = @[@"搜索",@"图片",@"视频",@"音乐"];
UISegmentedControl *sc = [[UISegmentedControl alloc] initWithItems:items];
sc .frame = CGRectMake(60, 100, 200, 40);
sc.tintColor = [UIColor redColor];
[self.window addSubview:sc];
[self.window makeKeyAndVisible];