2015-10-27- (void)layoutSubviews { skContentView.backgroundColor = self.backgroundColor; skContentView.frame = self.bounds; NSMutable ...
2015-10-27
- (void)layoutSubviews { skContentView.backgroundColor = self.backgroundColor; skContentView.frame = self.bounds; NSMutableAttributedString * string = [[ NSMutableAttributedString alloc ] initWithString:@"123456789101112计算" attributes:nil ] ; [string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:16.0] range:NSMakeRange(0,string.length-1)]; MMTextAttachment * textAttachment = [[ MMTextAttachment alloc ] initWithData:nil ofType:nil ] ; UIImage * smileImage = [ UIImage imageNamed:@"a.jpg" ] ; //my emoticon image named a.jpg textAttachment.image = smileImage ; NSAttributedString * textAttachmentString = [ NSAttributedString attributedStringWithAttachment:textAttachment ] ; [ string insertAttributedString:textAttachmentString atIndex:6 ] ; _skInputTextView.attributedText = string ;}
原标题:TextView表情文字混排
关键词:ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。