Shioyama-senpai
Shioyama-senpai

Reputation: 31

UIKeyboardWillChangeFrameNotification not always called

When developing an app for iOS, I've encountered a strange problem. To be precise, it's about a chat app. Inside the chat view controller, the message input box should stick to the keyboard when it appears. I've got that one covered with the UIKeyboardWillChangeFrameNotification. However, the problem is that this notification is not called when I change from the default keyboard to the emoji keyboard, which is slightly taller, the notification is not called (I'm leading both UIKeyboardWillChangeFrameNotification and UIKeyboardDidChangeFrameNotification to the same selector, none of them is called, I've tested it by doing a NSLog and setting a breakpoint). That results in the keyboard overlapping the message box. I made some screenshots to visualize the problem. Default keyboard Emoji keyboard

I've tested it on an iPhone X and on the iPhone 8 Plus Simulator, but there, everything's fine because the auto-completion bar makes up the difference between the two keyboards.

Am I implementing the wrong notification? How should I solve this problem?

Upvotes: 2

Views: 426

Answers (1)

Shioyama-senpai
Shioyama-senpai

Reputation: 31

Okay, it seems like this was an actual bug in iOS 11. It seems to be fixed in iOS 11.2.6.

Upvotes: 1

Related Questions