AUParagraphInputBox 为段落输入框控件,支持在业务中设置最大字数限制。
// 段落输入框
@interface AUParagraphInputBox : UIView
@property (nonatomic, strong) UITextView *textView; // 输入框
@property (nonatomic, assign) NSInteger maxInputLen; // 设置最大输入字数(需要才设置)
// 初始化
- (instancetype)initWithFrame:(CGRect)frame placeHolder:(NSString *)placeHolder;
// 设置 placeHolder 文本
- (void)setPlaceHolder:(NSString *)placeHolder;
@end
_paragraphInputBox = [[AUParagraphInputBox alloc] init];
_paragraphInputBox.frame = CGRectMake(0, startY, AUCommonUIGetScreenWidth(), 10);
_paragraphInputBox.maxInputLen = 1240;
_paragraphInputBox.textView.delegate = self;
[_paragraphInputBox setPlaceHolder:@"请输入你想表达的内容"];
[self.view addSubview:_paragraphInputBox];
在文档使用中是否遇到以下问题
更多建议
匿名提交