0

I can get the keyboard's dimension after its displayed from the notification, BUT I would like to position my textFields so that I don't have to scroll them when the keyboard appears. To achieve this I should know the keyboard's dimension BEFORE it's even displayed.

Is this possible on iOS?

SPQR3
  • 647
  • 7
  • 20
  • You mean that text field are hidden behind keyboard. Then you scroll them so that the hidden text fields come up and be visible – Chetan Mar 16 '16 at 10:09
  • Nope. Until the "keyboardWillShow" event gets called, you won't know the keyboard's size. And don't use hard-coded values for the keyboard height, it won't work...! http://stackoverflow.com/questions/11284321/what-is-the-height-of-iphones-onscreen-keyboard/27798712#27798712 – Mike Gledhill Mar 16 '16 at 10:09
  • Please add screen shot, it's help to clarify your question – Shrikant Tanwade Mar 17 '16 at 06:33
  • Possible duplicate of [Get height of iOS keyboard before a keyboard is displayed](https://stackoverflow.com/questions/26981261/get-height-of-ios-keyboard-before-a-keyboard-is-displayed) – Duncan Babbage Nov 04 '17 at 00:11

1 Answers1

0

You can use a class where this all things are handled by default. Just you have to use scroll view for this.

TPKeyboardAvoidingScrollView

See if it's useful and fulfill your requirement.

Chetan
  • 2,004
  • 1
  • 13
  • 21
  • If you just need keyboard size, either you need to hard code it or use keyboardWillShow notification.There is no other way – Chetan Mar 16 '16 at 10:16