1

I've created a custom keyboard and used the inputView property to associate it with a UITextField. When the "dismiss" button on my custom keyboard is pressed, I call resignFirstReponder on my text field.

Before you dismiss this as another IB outlet issue, it's not. The text field pointer is valid, and in fact after calling resignFirstResponder, the caret disappears, which proves that resignFirstResponder is in fact working. It's just that my custom keyboard isn't hiding itself. Any idea why?

Do I need to do anything special on the custom keyboard to make it hide itself?

4

1 回答 1

0

尝试这个:

[textField endEditing:YES];

它强制 textField 隐藏它的键盘,但我不是 100% 确定它也适用于自定义键盘。试试看 :)!

于 2011-03-30T19:31:07.413 回答