UILabel后添加标签(图片,UIView)

statusButton.titleLabel.text = statusText;[statusButton setTitle:statusText forState:UIControlStateNormal];[statusButton sizeToFit];[attrTitle addAttribute:NSFontAttributeName value:kThinFontWithSize(FONTSIZE_LITTLE) range:NSMakeRange(0, [attrTitle length])];NSMutableAttributedString *attachText = [NSMutableAttributedString yy_attachmentStringWithContent:statusButton contentMode:UIViewContentModeCenter attachmentSize:statusButton.size alignToFont:kThinFontWithSize(FONTSIZE_LITTLE) alignment:YYTextVerticalAlignmentCenter];[attrTitle appendAttributedString:attachText];_titleLabel.attributedText = attrTitle;

推荐阅读更多精彩内容