59 #import <QuartzCore/QuartzCore.h>
61 #define TEXTAREA_BASE_HEIGHT 44
62 #define TEXTAREA_BACKGROUND_COLOR [UIColor whiteColor]
63 #define TEXTVIEW_BG_COLOR [UIColor clearColor]
65 #define TEXTVIEW_FONT_SIZE 14
67 #define PLACEHOLDER_FONT_COLOR [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.1f]
68 #define TEXTVIEW_FONT_COLOR [UIColor colorWithRed:0.4f green:0.4f blue:0.4f alpha:1.0f]
70 @interface MTextView : UIView <UITextViewDelegate, NSLayoutManagerDelegate>
77 @property (strong, nonatomic) UIView *textAreaView;
78 @property (strong, nonatomic) UIView *childeView;
79 @property (strong, nonatomic) UITextView *textView;
82 -(id)initWithFrame:(CGRect)argFrame andIdentifier:(NSString *)argIdentifier
83 andView:(UIView *)argChildeView
84 andMaxInputLength:(
int)argMaxInputLength
85 andTextAreaHieght:(
float)argTextAreaHeight
86 andPlaceHolder:(NSString *)argPlaceHolder
87 andTextAreaBackgroundImage:(UIImage *)argTextAreaBackgroundImage
88 andTextView:(UITextView *)argTextView
89 andLeftBtn:(UIButton *)argLeftBtn
90 andRightBtn:(UIButton *)argRightBtn
91 leftBlock:(BOOL(^)(NSString *inputText))argLeftCompletion
92 rightBlock:(BOOL(^)(NSString *inputText))argRightCompletion
93 limitCheckBlock:(BOOL(^)(BOOL limitUnover,
float length))arglimitCheckCompletion;
95 -(id)initWithFrame:(CGRect)argFrame andIdentifier:(NSString *)argIdentifier
96 andView:(UIView *)argChildeView
97 andMaxInputLength:(
int)argMaxInputLength
98 andTextAreaHieght:(
float)argTextAreaHeight
99 andPlaceHolder:(NSString *)argPlaceHolder
100 andTextAreaBackgroundImage:(UIImage *)argTextAreaBackgroundImage
101 andLeftBtn:(UIButton *)argLeftBtn
102 andRightBtn:(UIButton *)argRightBtn
103 leftBlock:(BOOL(^)(NSString *inputText))argLeftCompletion
104 rightBlock:(BOOL(^)(NSString *inputText))argRightCompletion
105 limitCheckBlock:(BOOL(^)(BOOL limitUnover,
float length))argLimitCheckCompletion;
108 -(id)initWithFrame:(CGRect)argFrame andIdentifier:(NSString *)argIdentifier
109 andView:(UIView *)argChildeView
110 andMaxInputLength:(
int)argMaxInputLength
111 andTextAreaHieght:(
float)argTextAreaHeight
112 andPlaceHolder:(NSString *)argPlaceHolder
113 andTextAreaBackgroundImage:(UIImage *)argTextAreaBackgroundImage
114 andLeftBtnImage:(UIImage *)argLeftBtnImage
115 andRightImage:(UIImage *)argRightBtnImage
116 leftBlock:(BOOL(^)(NSString *inputText))argLeftCompletion
117 rightBlock:(BOOL(^)(NSString *inputText))argRightCompletion
118 limitCheckBlock:(BOOL(^)(BOOL limitUnover,
float length))arglimitCheckCompletion;
121 -(id)initWithFrame:(CGRect)argFrame andIdentifier:(NSString *)argIdentifier
122 andView:(UIView *)argChildeView
123 andMaxInputLength:(
int)argMaxInputLength
124 andPlaceHolder:(NSString *)argPlaceHolder
125 leftBlock:(BOOL(^)(NSString *inputText))argLeftCompletion
126 rightBlock:(BOOL(^)(NSString *inputText))argRightCompletion
127 limitCheckBlock:(BOOL(^)(BOOL limitUnover,
float length))arglimitCheckCompletion;
130 - (void)hideKeyboard;
134 - (void)setText:(NSString *)argText;
136 - (void)enabledLeft:(BOOL)argEnabled;
138 - (NSString *)getText;
140 - (void)enabledRight:(BOOL)argEnabled;
142 - (void)keyboardWillShow:(NSNotification *)notification;
144 - (void)keyboardWillHide:(NSNotification *)notification;
Definition: MTextView.h:70