UIButton *onlyPriceBtn = [UIButton buttonWithType:UIButtonTypeCustom]; onlyPriceBtn.layer ...
转自:http: my.oschina.net CarlHuang blog 在项目开发中,我们经常会遇到在这样一种情形:在一个UILabel 使用不同的颜色或不同的字体来体现字符串,在iOS 以后我们可以很轻松的实现这一点,官方的API 为我们提供了UILabel类的attributedText, 使用不同颜色和不同字体的字符串,我们可以使用NSAttributedText 和 NSMutabl ...
2014-02-15 14:34 0 82398 推荐指数:
UIButton *onlyPriceBtn = [UIButton buttonWithType:UIButtonTypeCustom]; onlyPriceBtn.layer ...
显示不同的字体,需要设置其 attributedText属性 该属性是NSMutableAttrib ...
1、UILabel字体加粗 IOS 加粗; [UILabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:20]]; 加粗并且倾斜 [UILabel setFont:[UIFont fontWithName ...
//协议 UILabel *xieLabel = [[UILabel alloc] init]; xieLabel.textColor = TextGrayColor; xieLabel.font = [UIFont systemFontOfSize:12 ...
iOS7以后系统提供了显示html标签的方法 直接上代码 代码效果 ...
NSAttributedString的初始化方法有: -initWithString:用String初始化,并没有Attributed信息。 -initWit ...
让UILabel的内容竖行显示,我经常用一下两种方式: 第一种:使用换行符 \n 第二种:使用lineBreakMode属性 其他的属性设置,可以参考我写的那篇《UILabel全属性》 ...