(Iphone 应用程序)我想在用户选择文本字段后发送一条消息,仅在该文本字段中。但是当我们点击文本字段时,键盘就会出现。
问问题
407 次
2 回答
1
设置的委托,UITextField
并在委托中实现此方法:
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
// Do whatever you want
return NO;
}
于 2013-07-16T11:44:20.783 回答
-1
添加文件和文件集中你的UITextFieldDelegate
并编写下面的代码...h
.m
yourTextField.delegate = self;
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
// write your messagehere
return NO;
}
于 2013-07-16T11:44:32.667 回答