如图所示:
【线上担保】 几个字是一个图片。
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
attch.image = [UIImage imageNamed:@"kc_order_list_title_tag_on"];
attch.bounds =CGRectMake(0, -3,58,17);
NSAttributedString *imageString = [NSAttributedString attributedStringWithAttachment:attch];
NSMutableAttributedString *abs = [[NSMutableAttributedString alloc] initWithString:_labelTitle.text];
[abs appendAttributedString:imageString];
_labelTitle.attributedText= abs;
网友评论