-2

I was wondering how I can detect the keyboard in IOS when it is on screen. I am working on it all day but I can't get it to work.

0

1 Answer 1

1

There is special NSNotification to handle that. You can add observer to listen for it (don't forget to unsubscribe)

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShown:) name:UIKeyboardWillShowNotification object:nil]; 

And then you can handle that in the method:

- (void)keyboardWillShown:(NSNotification *)notification { // handle } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.