2

I would like to be able to have another control become the first responder yet keep the keyboard showing to the user.

I found disablesAutomaticKeyboardDismissal in UIViewController and overrode it but it never get's called (iOS 5.0)

Is there a reason this method would not get called? Is there another way to keep the keyboard showing even though it's not required by the first responder?

4

1 回答 1

2

虽然感觉有点像 hack 我所做的是在 UIView 上覆盖 canBecomeFirstResponder 以返回 YES 然后实现 UIKeyProtocol

https://developer.apple.com/library/IOS/documentation/UIKit/Reference/UIKeyInput_Protocol/Reference/Reference.html

但是在按键上什么也没做。这样键盘保持打开状态,但按键无关紧要。

于 2013-09-01T05:29:14.427 回答