[iOS] NSTextAttachment示例

2018-04-26  本文已影响17人  manajay
    NSTextAttachment *imageAttachment = [[NSTextAttachment alloc] init];
    imageAttachment.image = image;
    imageAttachment.bounds = CGRectMake(0, 0, 30, 30);
    NSDictionary *imageAttributes = @{NSAttachmentAttributeName:imageAttachment};
    NSAttributedString *imageAttStr = [[NSAttributedString alloc] initWithString:@"" attributes:imageAttributes];
上一篇下一篇

猜你喜欢

热点阅读