Reputation: 15071
My actual UITextField
control is embedded many layers down in an external library. Therefore I am unable to detect if it is being edited by calling
control isFirstResponder
.
Is there another way to detect if the software keyboard is shown?
Upvotes: 0
Views: 190
Reputation: 273
Yes, try setting up a listener for notifications such as "UIKeyboardWillShowNotification". In the userInfo for the notification you can get the bounds for the keyboard and thus determine if it is visible (on screen) or not. Look in UIWindow.h.
Upvotes: 3