我有一个可变属性字符串,我添加了一个图像文本附件。
NSMutableAttributedString* attributedString = [_textField.attributedText mutableCopy];
NSMutableDictionary* dict = [_homeFeedCommentsViewController.inputData.array_extraElements objectAtIndex:0];
NSNumber* indexObject = [NSNumber numberWithUnsignedLong:attributedString.length];
[dict setObject:indexObject forKey:@"LocationIndex"];
[attributedString insertAttributedString:imageAsAttributedString atIndex:attributedString.length];
我现在如何获取该文本附件并将其替换为图像应该位于文本正文中的位置的字符串?