label标题文字改变颜色
来源:互联网 发布:mac系统重装 编辑:程序博客网 时间:2024/05/21 20:59
NSMutableAttributedString *noteStr = [[NSMutableAttributedString alloc] initWithString:@"输入一段话,123改变颜色"];
NSRange redRange = NSMakeRange([[noteStr string] rangeOfString:@"123"].location, [[noteStr string] rangeOfString:@"123"].length);
[noteStr addAttribute:NSForegroundColorAttributeName value:colorWithRGBA(89, 212, 234, 1) range:redRange];
[Label setAttributedText:noteStr];
NSRange redRange = NSMakeRange([[noteStr string] rangeOfString:@"123"].location, [[noteStr string] rangeOfString:@"123"].length);
[noteStr addAttribute:NSForegroundColorAttributeName value:colorWithRGBA(89, 212, 234, 1) range:redRange];
[Label setAttributedText:noteStr];
0 0
- label标题文字改变颜色
- 改变label部分文字的颜色
- iOS改变Label上指定文字的颜色
- 面试遇到CADisplayLink 定时器改变label文字颜色的问题
- label上文字数字混排,只改变数字颜色
- Label文字多种颜色
- Label文字颜色
- label 省略号颜色改变
- 改变UIButton上标题位置、文字颜色、背景色等
- FLEX DataGrid背景颜色调试 应用label改变column中文字的颜色
- android改变标题文字
- UINavigationController标题文字颜色
- iOS Label文字分段颜色
- iOS Label文字分段颜色
- radiobutton 文字颜色改变
- IOS UITabBar+UINavigation(改变背景/标题文字颜色、状态图片、tabbar选中方形背景、item间距)
- 改变navgationitem标题的颜色
- 根据文字改变高度的Label
- MySQL性能优化的最佳经验
- 什么是Entity Framework(ORM)
- 使用Glide下载图片
- jQuery中 filter()与find()的用法
- ADN:开启用户体验新时代
- label标题文字改变颜色
- WPF 创建通知栏图标和菜单选项
- 物联网框架SuperIO 2.2.9和ServerSuperIO 2.1同时更新,更适用于类似西门子s7-200发送多次数据,才能读取数据的情况
- Java---类集
- openstack-M版启动虚拟机的XML文件
- mbed使用EmBitz 提示warning: .objs\main.o: linker input file unused because linking not done
- 引用计数 vs. GC
- svn命令
- 搭建nginx+registry的private registry