父文本的使用
来源:互联网 发布:淘宝开食品店没证件 编辑:程序博客网 时间:2024/06/05 02:52
UILabel *testLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, 320, 30)];
testLabel.backgroundColor = [UIColor lightGrayColor];
testLabel.textAlignment = NSTextAlignmentCenter;
NSMutableAttributedString *AttributedStr = [[NSMutableAttributedString alloc]initWithString:@"今天天气不错呀"];
[AttributedStr addAttribute:NSFontAttributeName
value:[UIFont systemFontOfSize:16.0]
range:NSMakeRange(2, 2)];
[AttributedStr addAttribute:NSForegroundColorAttributeName
value:[UIColor redColor]
range:NSMakeRange(2, 2)];
testLabel.attributedText = AttributedStr;
[self.view addSubview:testLabel];
- 父文本的使用
- 瞄文本的使用
- 折叠文本的使用
- 富文本的使用
- ewebeditor文本编辑器的使用。
- webEditor文本编辑器的使用
- vim文本编辑器的使用
- web 文本编辑器的使用
- 静态文本控件的使用
- vim文本编辑器的使用
- 富文本的使用 NSMutableAttributedString
- iOS富文本的使用
- 【egret】 输入文本的使用
- 富文本的使用-KindEditor
- 富文本编辑器的使用
- 富文本编辑器的使用
- 文本服务框架的使用
- UMEditor文本编辑器的使用
- 简单算法之费式数列
- android的binder机制(C++)
- 基本的ARC使用规则
- linux video 编程 h264 YUYV
- Java基础之线程
- 父文本的使用
- iOS依赖注入
- 移动web开发之——viewport
- TABBAR选中后字体颜色
- 新手centOS安装JDK
- UITableView相关
- Linux AIO机制
- 程序员必备的600个英语词汇(1)
- Windows中在CMD下设置支持UTF8编码格式