IOS点击UITextField不弹出键盘但是可以输入粘贴。。。

来源:互联网 发布:中信出版的经管 知乎 编辑:程序博客网 时间:2024/04/29 06:19



UITextFieldDelegate

self.textField.delegate =self;


- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField

{

     _textField.inputView = [[UIViewalloc]initWithFrame:CGRectZero];

    returnYES;

}


文本框 添加输入监听

    [self.textFieldaddTarget:selfaction:@selector(textFieldDidChange:)forControlEvents:UIControlEventEditingChanged];


0 0
原创粉丝点击