Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARC, Chinese input and emoji delete #22

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions EGOTextView/EGOTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ extern NSString * const EGOTextAttachmentPlaceholderString;

- (void)egoTextViewDidChangeSelection:(EGOTextView *)textView;

- (void)egoTextView:(EGOTextView*)textView didSelectURL:(NSURL*)URL;

@end

@protocol EGOTextAttachmentCell <NSObject>
Expand All @@ -66,7 +64,7 @@ extern NSString * const EGOTextAttachmentPlaceholderString;
@private
NSMutableAttributedString *_mutableAttributedString;
NSDictionary *_markedTextStyle;
id <UITextInputDelegate> _inputDelegate;
__unsafe_unretained id <UITextInputDelegate> _inputDelegate;
UITextInputStringTokenizer *_tokenizer;
UITextChecker *_textChecker;
UILongPressGestureRecognizer *_longPress;
Expand All @@ -80,17 +78,12 @@ extern NSString * const EGOTextAttachmentPlaceholderString;
BOOL _delegateRespondsToDidChangeSelection;
BOOL _delegateRespondsToDidSelectURL;

NSAttributedString *_attributedString;
UIFont *_font;
BOOL _editing;
BOOL _editable;
BOOL _spellCheck;
BOOL _dataDetectors;


NSRange _markedRange;
NSRange _selectedRange;
NSRange _correctionRange;
NSRange _linkRange;

CTFramesetterRef _framesetter;
CTFrameRef _frame;
Expand All @@ -100,22 +93,20 @@ extern NSString * const EGOTextAttachmentPlaceholderString;
EGOCaretView *_caretView;
EGOSelectionView *_selectionView;

NSMutableArray *_attachmentViews;

}

@property(nonatomic) UIDataDetectorTypes dataDetectorTypes; // UIDataDetectorTypeLink supported
@property(nonatomic) UITextAutocapitalizationType autocapitalizationType;
@property(nonatomic) UITextAutocorrectionType autocorrectionType;
@property(nonatomic) UIKeyboardType keyboardType;
@property(nonatomic) UIKeyboardAppearance keyboardAppearance;
@property(nonatomic) UIReturnKeyType returnKeyType;
@property(nonatomic) BOOL enablesReturnKeyAutomatically;

@property(nonatomic,assign) id <EGOTextViewDelegate> delegate;
@property(nonatomic,unsafe_unretained) id <EGOTextViewDelegate> delegate;
@property(nonatomic,copy) NSAttributedString *attributedString;
@property(nonatomic,copy) NSString *text;
@property(nonatomic,retain) UIFont *font; // ignored when attributedString is not nil
@property(nonatomic,strong) UIFont *font; // ignored when attributedString is not nil
@property(nonatomic,getter=isEditable) BOOL editable; //default YES
@property(nonatomic) NSRange selectedRange;
@property(nonatomic) NSRange markedRange;
Expand Down
Loading