UISegmentControl/多段选择视图
来源:互联网 发布:温州淘宝运营培训学校 编辑:程序博客网 时间:2024/04/30 03:56
UISegmentControl/多段选择视图
NSArray *array=[NSArray arrayWithObjects:@"First",@"Second",@"Third", nil];
1、分段选择控件
UISegmentedControl *sc=[[UISegmentedControl alloc] initWithItems:array];
[sc setFrame:CGRectMake(50, 200, 200, 50)];
2、设置控件颜色
sc.tintColor=[UIColor redColor];
3、默认选择起始位置
sc.selectedSegmentIndex=1;
4、自适应内容,(哪个宽加宽哪个框)
sc.apportionsSegmentWidthsByContent=YES;
5、改变内容
[sc setTitle:@"Thir d" forSegmentAtIndex:2];
6、添加事件
[sc addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged];
7、添加控件
[self.view addSubview:sc];
0 0
- UISegmentControl/多段选择视图
- UISegmentControl 分段视图控制器
- UISegmentControl
- UISegmentControl
- UISegmentControl
- UISegmentControl
- UISegmentControl
- 选择视图
- 视图选择
- 段选择符 段寄存器
- 段选择符 段寄存器
- 段选择符 段寄存器
- 多视图关联选择的例子
- UISegmentControl用法
- 自定义UISegmentControl
- UISegmentControl控件
- UISegmentControl控件
- 日历 日期段选择
- 只要关系配置正确,一条sql就可以解决循环中查询数据库的问题
- TCP/IP详解学习笔记——IP协议
- HDU 3681 Prison Break (状压DP+二分)
- Servlet--取得session,application内置对象
- mac 下面 you have an outdated version of /usr/bin/install_name_tool installed
- UISegmentControl/多段选择视图
- 怎么从Linux服务器上下载超过4G的文件?
- Android UI 组件开源软件
- 第三章(在线程间共享数据)
- Qt初学者,一路磕绊,将两天来心得发一下聊以遣怀。
- 【转】线程的7种状态及相互转换
- 网络技术原理和应用读后感
- com.android.volley.TimeoutError 3G 节省流量
- 信息系统项目管理师考试心得