UIImage
*image = [UIImage imageNamed:@
"321.jpg"
];
//
1> 生成文本附件
NSTextAttachment
*textAttach
= [[
NSTextAttachment
alloc]
init];
textAttach.image
= image;
//
2> 使用文本附件創建屬性文本
NSAttributedString
*strA
= [
NSAttributedString
attributedStringWithAttachment:textAttach];
self
.lblChat.attributedText
= strA;