NSTextAttachment *attach = [[NSTextAttachment alloc] init];
attach.image = [UIImage imageNamed:@"Rectangle"];
attach.bounds = CGRectMake(0, -1, 26, 13);
[attStr insertAttributedString:[NSAttributedString attributedStringWithAttachment:attach] atIndex:0];
self.titleLabel.attributedText = attStr;
网友评论