0

I am trying to adjust my scroll view to prevent keyboard from covering UITextField. I've managed to do it based on answers in this post and Apple docs.

Using

CGRect keyboardSize = [[userInfo objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue];

returns correct CGRect for a default keyboard, however it doesn't calculate it properly when user has third-party keyboard installed. For example SwiftKey keyboard.

Any ideas as how to calculate keyboards frame/height even if custom keyboard is being used?

Community
  • 1
  • 1
Fengson
  • 4,751
  • 8
  • 37
  • 62
  • Please show your real code (i.e. what you're really doing). – matt Feb 18 '16 at 15:42
  • 1
    @matt Does my code matter here? Everything works without issues with the exception of custom keyboard. Unless UIKeyboardFrameBeginUserInfoKey should return correct height for a custom keyboard as well. – Fengson Feb 18 '16 at 15:49
  • Did you try http://stackoverflow.com/questions/3546571/how-to-get-uikeyboard-size-with-apple-iphone-sdk ? – Starlord Feb 18 '16 at 16:08
  • @Starlord Yes, as you can see in my initial post, this is exactly what I'm using. – Fengson Feb 18 '16 at 16:11
  • did you ever find an answer to this? I get a lot of bouncing until the real value is given which happens on the 2 call for custom keyboards – agibson007 Jan 10 '19 at 01:09

0 Answers0