DDAttachmentTextView
DDAttachmentTextView copied to clipboard
A custom attachment rich text editor. 可自定义组件的富文本编辑器
trafficstars
Custom RichTextView Belong to UITextView
Write a rich text view editor easily.

CoacoPods
TODO
How to use
- Create your attachment object.
@interface DDImageAttachmentObject : DDAttachmentObject
@property (strong, nonatomic) UIImage *image;
@end
- Return your attachment view matched attachment object.
- (DDAttachmentReusableView *)textView:(DDAttachmentTextView *)textView attachmentViewWithAttachment:(DDTextAttachment *)attachment {
if ([attachment.data isKindOfClass:[DDImageAttachmentObject class]]) {
DDImageAttachmentView *view = [textView dequeueReusableAttachmentViewWithIdentifier:@"image"];
view.imageView.image = ((DDImageAttachmentObject *)attachment.data).image;
return view;
}
return nil;
}
- That's all!
LISENCE
MIT