UISegmentControl样式设置
来源:互联网 发布:我国加工贸易知乎 编辑:程序博客网 时间:2024/06/05 13:23
设置选中未选中时的效果,很简单,一目了然
NSArray *array = @[@"第一组",@"第二组"]; segmentC = [[UISegmentedControl alloc]initWithItems:array]; [segmentC addTarget:self action:@selector(change:) forControlEvents:UIControlEventValueChanged]; segmentC.tintColor = [UIColor clearColor]; NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"Heiti SC" size:13],NSFontAttributeName,[UIColor lightGrayColor], NSForegroundColorAttributeName, nil]; [segmentC setTitleTextAttributes:attributes forState:UIControlStateNormal]; NSDictionary *highlightedAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"Heiti SC" size:15],NSFontAttributeName,backTextColor, NSForegroundColorAttributeName, nil]; [segmentC setTitleTextAttributes:highlightedAttributes forState:UIControlStateSelected]; segmentC.selectedSegmentIndex = 0; [self.view addSubview:segmentC];
0 0
- UISegmentControl样式设置
- 设置UISegmentControl的文字属性
- UISegmentControl
- UISegmentControl
- UISegmentControl
- UISegmentControl
- UISegmentControl
- [iOS学习]UISegmentControl的无边框形式如何设置
- UISegmentControl用法
- 自定义UISegmentControl
- UISegmentControl控件
- UISegmentControl控件
- UINavigationItem添加UISegmentControl
- UISegmentControl的用法
- iOS基础 -- UISegmentControl
- UISegmentControl、UISlider、UIImageView
- UISegmentControl的使用方法
- UISegmentControl 分段视图控制器
- linux安装软件的几种方法
- freemarker常用标签
- Tomcat配置成Windows服务
- eclipse中插件svn中分支与主干合并
- 深入理解Hadoop集群和网络
- UISegmentControl样式设置
- java 企业网站源码模版 有前后台 springmvc SSM 生成静态化
- 解决Android的button按钮默认自带阴影效果
- 项目上的红叉,或项目不能运行
- linux 权限说明
- JAVA学习日志:static关键字
- 如何用代码在Excel中实现单元格内换行
- Jquery的loading插件
- LeetCode-303. Range Sum Query