Skip to content

A custom attachment rich text editor. 可自定义组件的富文本编辑器

Notifications You must be signed in to change notification settings

djs66256/DDAttachmentTextView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom RichTextView Belong to UITextView

Write a rich text view editor easily.

image

CoacoPods

TODO

How to use

  1. Create your attachment object.
@interface DDImageAttachmentObject : DDAttachmentObject
@property (strong, nonatomic) UIImage *image;
@end
  1. 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;
}
  1. That's all!

LISENCE

MIT

About

A custom attachment rich text editor. 可自定义组件的富文本编辑器

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published