How to find out if UIkeyboard has appeared or not in iOS?

How can I find out what is UIKeyboardopen in my application or not?

I do not want to use any delegate methods UITextField.

Please suggest any solution.

Thanks in advance.

+5
source share
2 answers

Check this:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
+5
source

From the official documentation

Use keyboard notification for verification status UIKeyBoard.

Keyboard Notifications:

, . , , , . - . , :

UIKeyboardWillShowNotification
UIKeyboardDidShowNotification
UIKeyboardWillHideNotification
UIKeyboardDidHideNotification
+4

All Articles