私はHTMLページを持っており、これにtextfields
触れた後、静的情報を表示してキーボードを非表示にする必要があります。どうすればこれを行うことができますか?textfield
UIWebView
UIPopOver
2 に答える
0
テキストフィールドinputview
を nil に設定します。
textField.inputView = nil;
于 2013-07-04T12:03:36.317 に答える
0
このコードをviewDidLoad
メソッドに入れて、キーボードが表示されたときに通知する通知です
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow) name:UIKeyboardDidShowNotification object:nil];
UITextField
次の通知方法でポップアップビューを追加します
- (void)keyboardDidShow
{
if(self.myTextFieldName)
{
[myTextFieldName resignFirstResponder]; /// resignFirstResponder/hideKeyBoard when you click on UITextFiled
myTextFieldName.inputView = self.PopUpView. // and add your popup view as input view of yourTextFiled
}
}
于 2013-07-04T12:18:17.537 に答える