All Products
Search
Document Center

Paragraph input box

Last Updated: May 13, 2021

AUParagraphInputBox is a multi-line input box control. The maximum number of characters allowed in specific business can be specified for it.

Sample images

API description

 
  1. // The multi-line text input box.
  2. @interface AUParagraphInputBox : UIView
  3. @property (nonatomic, strong) UITextView *textView; // Imput box
  4. @property (nonatomic, assign) NSInteger maxInputLen; // Set the character limit (as required)
  5. // Initialization.
  6. - (instancetype)initWithFrame:(CGRect)frame placeHolder:(NSString *)placeHolder;
  7. // Set the placeHolder text.
  8. - (void)setPlaceHolder:(NSString *)placeHolder;
  9. @end

Code sample

 
  1. _paragraphInputBox = [[AUParagraphInputBox alloc] init];
  2. _paragraphInputBox.frame = CGRectMake(0, startY, AUCommonUIGetScreenWidth(), 10);
  3. _paragraphInputBox.maxInputLen = 1240;
  4. _paragraphInputBox.textView.delegate = self;
  5. [_paragraphInputBox setPlaceHolder:@"Please enter text here"];
  6. [self.view addSubview:_paragraphInputBox];