![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS UILabel
文章平均质量分 65
XLawsZero
这个作者很懒,什么都没留下…
展开
-
iOS 在一个UILabel上显示不同颜色
self.addressLabel = [[UILabelalloc]initWithFrame:CGRectZero]; self.addressLabel.textColor = [UIColorblackColor]; self.addressLabel.font = [UIFontsystemFontOfSize:15];原创 2016-08-29 14:56:46 · 1966 阅读 · 0 评论 -
iOS 在一个UILabel里面字体大小不一样
NSMutableAttributedString * noteStr = [[NSMutableAttributedStringalloc]initWithString:[NSStringstringWithFormat:@"¥%@",哈哈哈哈哈哈哈]]; NSRange redRangeTwo =NSMakeRange([[noteStr string]原创 2016-08-29 17:54:12 · 5999 阅读 · 0 评论 -
iOS 在UILabel上添加横线
NSString * oldPrice = [NSStringstringWithFormat:@"¥%@",orderDetails.UnitPrice]; NSUInteger length = oldPrice.length; NSMutableAttributedString * attri = [[NSMutableAttributedStringal原创 2016-11-03 15:24:53 · 2449 阅读 · 0 评论 -
iOS UILabel自适应宽度
UILabel * label = [[UILabelalloc]initWithFrame:CGRectMake(100,100, 80,20)]; label.backgroundColor = [UIColor whiteColor]; label.textColor = [UIColor blackColor]; label原创 2017-01-05 14:47:29 · 6520 阅读 · 0 评论 -
iOS 运用富文本在UILabel上显示图片
NSMutableAttributedString * attrubedStr = [[NSMutableAttributedStringalloc]initWithString:[NSStringstringWithFormat:@"哈哈哈哈"]]; NSTextAttachment * attach = [[NSTextAttachmentalloc]原创 2017-06-30 15:18:26 · 2917 阅读 · 1 评论 -
iOS UILabel 只修改字符串中的数字的颜色
NSString * content =@"fgd87484fdjdhj322"; NSArray * number =@[@"0",@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"."]; NSMutableAttributedString * attributeString = [[NSMutableAtt原创 2017-09-25 16:19:43 · 1662 阅读 · 0 评论