设置UISegmentControl的文字属性
来源:互联网 发布:网络的利与弊议论文400 编辑:程序博客网 时间:2024/05/17 08:20
以下代码可以设置UISegmentControl的文字属性。
UISegmentedControl *segmentedControl =.................;
segmentedControl.layer.cornerRadius = 20;
segmentedControl.clipsToBounds = YES;
segmentedControl.tintColor =[UIColor redColor]; //设置颜色
NSDictionary* selectedTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:12],
NSForegroundColorAttributeName: [UIColor whiteColor]};
[segmentedControl setTitleTextAttributes:selectedTextAttributes forState:UIControlStateSelected];//设置文字属性
NSDictionary* unselectedTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:12],
NSForegroundColorAttributeName: [UIColor redColor]};
[segmentedControl setTitleTextAttributes:unselectedTextAttributes forState:UIControlStateNormal];
- 设置UISegmentControl的文字属性
- 设定UISegmentControl的文字属性
- UISegmentControl的属性和方法
- UISegmentControl的属性和方法
- UISegmentControl样式设置
- [iOS学习]UISegmentControl的无边框形式如何设置
- 设置ActionBar menu文字的属性
- css设置文字属性的示例
- 设置item文字属性
- 设置文字属性
- iOS 文字属性设置
- 设置文字属性
- 设置文字段落属性
- UISegmentControl的用法
- UISegmentControl的使用方法
- UISegmentControl的使用
- UISegmentControl
- UISegmentControl
- MYSQL Partition
- [Leetcode]24. Swap Nodes in Pairs
- 热血军团-GameLogic
- 两种外发光shader的比较
- hadoop 运行出错,name的clusterID和data的ClusterId不一致问题
- 设置UISegmentControl的文字属性
- Nginx与Tomcat结合,亲测可行
- 粒子动画
- API 的私用和公开
- Android SlidingMenu 开源项目实现侧拉菜单(一)
- java程序员必知的8大排序
- POJ2406 Power Strings
- Java泛型详解
- nyoj 1279 (河南省第九届ACM比赛 D 题)