我向UITextView
添加了一张图片。附加后,我要调整大小。我试图改变但失败了。
[richTextTV.attributedText enumerateAttribute:NSAttachmentAttributeName
inRange:NSMakeRange(0[richTextTV.attributedText length])
options:0
usingBlock:^(id value, NSRange range, BOOL *stop)
{
if ([value isKindOfClass:[NSTextAttachment class]])
{
NSTextAttachment *attachment = (NSTextAttachment *)value;
CGRect bounds = CGRectMake(0, 0 , 200 , 200);
attachment.bounds = bounds;
}
}];
预先感谢