设定字符串字符的颜色
来源:互联网 发布:淘宝bug 编辑:程序博客网 时间:2024/05/22 11:55
NSString *title2=@"欢迎阅读《你好明天》声明";
NSMutableAttributedString *att = [[NSMutableAttributedStringalloc]initWithString:title2];
[att addAttribute:NSForegroundColorAttributeNamevalue:[UIColorblueColor] range:NSMakeRange(4,5)];
UILabel *label = [[UILabelalloc] initWithFrame:CGRectMake(50,200, 250,30)];
label.font = [UIFontsystemFontOfSize:14];
label.text = title2;
label.textColor = [UIColorlightGrayColor];
label.attributedText = att;
[self.viewaddSubview:label];
0 0
- 设定字符串字符的颜色
- 十六进制颜色的设定
- 颜色的设定
- 改变字符串中指定字符的颜色
- 改变字符串中指定字符的颜色
- ListView的多样颜色设定
- 设定EBS FORM的颜色
- PS1:(提示字符的设定)
- IOS-51-改变字符串中指定字符的颜色
- winform数据库连接字符串的设定
- 如何设定浏览器滚动条的颜色
- 设定JFreeChart柱子上面的颜色
- MyEclipse中背景颜色的设定
- 颜色对话框、背景色的设定
- Android控件颜色的透明度设定
- 终端的字符颜色
- ABAP ALV的颜色设定(单元格,行,列的颜色设定)
- awk分隔符设定为多个字符或字符串
- Java http get与post请求
- 最长连续序列
- Spring MVC handler interceptors example
- 忍忍
- word转pdf还有什么好的方法
- 设定字符串字符的颜色
- iOS界面设计切图小结
- Uva 11582 Colossal Fibonacci Numbers! 快速幂,斐波那契
- LeetCode_OJ【15】3Sum
- POJ1753 Flip Game【高斯消元法】
- C++全局函数与类成员函数的区别和相互转化
- jQuery与MooTools库的一些比对
- Java NIO内存映射---上G大文件处理
- dell 功能快捷键切换