Display layout when keyboard is activated

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
GoneToSail
Posts: 32
Joined: Sun Jan 24, 2010 10:34 pm

Display layout when keyboard is activated

Post by GoneToSail » Thu Aug 18, 2016 1:48 pm

In order to better arrange the restricted screen area which is available when a keyboard is activated, is there any function or script which can return the top of such keyboard, i.e. the number of pixels from the top of the card (which appears to be different on various models of iPhones or iPads).
Thanks for any assistance.

Klaus
Posts: 12075
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Display layout when keyboard is activated

Post by Klaus » Thu Aug 18, 2016 2:22 pm

Hello Sailor,

not directly, but you can check "the effective screenrect" and do a little math
to find out the dimensions of the keyboard. From the docs about "screenrect":
...
Adding the effective adjective to either form returns the area of the screen the application has to itself.
In particular, if the keyboard is activated, it take into account if the keyboard is taking up space on the screen.
(Android and iOS only)
...

Best

Klaus

GoneToSail
Posts: 32
Joined: Sun Jan 24, 2010 10:34 pm

Re: Display layout when keyboard is activated

Post by GoneToSail » Thu Aug 18, 2016 5:14 pm

So simple !
I actually used "the effective working screenRect" and it works fine.

Thanks Klaus !

Post Reply

Return to “iOS Deployment”