Page 1 of 1

change the size of a card when keyboard appears

Posted: Tue Oct 29, 2013 8:52 pm
by jihem
Hi,
I can detect when the keyboard is activated/deactivated. But I don't know his height... So how can I change the size of the stack? move my input fields and button to a upper position?
Thx

Re: change the size of a card when keyboard appears

Posted: Wed Oct 30, 2013 11:06 pm
by Mark
Hi,

You can use the working screenRect to get the area that is not covered by the keyboard. The difference between the screenRect and the working screenRect gives you the height of the keyboard.

I've noticed that the keyboard can be a bit slow. You need to make sure that you check working screenRect some time after the keyboard appears or disappears. Half a second should be enough.

Kind regards,

Mark

Re: change the size of a card when keyboard appears

Posted: Thu Oct 31, 2013 1:34 pm
by jihem
Hi,
Thanks Mark. This helps.
Kind regards,
jihem