1.设置默认字体字体
[text setPlaceholder:@"inputpassword"];
2.设置边框类型代理
[text setBorderStyle:UITextBorderStyleLine];
3.设置键盘类型code
[text setKeyboardType:UIKeyboardTypeAlphabet];
4.开启键盘事件
[textField becomeFirstResponder];
5.关闭键盘input
[textField resignFirstResponder];
[self.view endEditing:YES];
4.回车代理事件string
- (BOOL)textFieldShouldReturn:(UITextField *)textField{}
5.点击文本框代理事件it
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{}
6.文本框内容改变的代理事件class
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{}