Keyboard in IOS and Field Focus
Vaughn Clement
vclement at gmail.com
Wed Nov 6 16:46:19 EST 2013
Hi Dave
Your Comments:
In general on iOS I try to keep using LiveCode fields rather than going for
native fields
*** Please explain what your calling "NativeFields" and LiveCode fields?
- I then have lots of functionality I'm used to - but do have
to spend time making the field look pretty...
*** How do the fields look different?
So this is what I do:
1 - In my text entry field I make sure that 'TraversalOn' is set
*** Is this found in the property inspector?
2 - In the script of the field's card I have keyboardActivated and
keyboardDeactivated handlers to catch the LiveCode messages and inside these
I can call other handlers to move fields up and back down again catering for
the keyboard
*** This is the interesting think about LiveCode is there are so many ways
to code things. Do you have an example of this script?
3 - Using the 'effective screenRect' provides the area of the app not taken
up by the keyboard (when active) which you can use to calculate where to
move the text entry field and other stuff to
*** I have many fields and labels to move, so can I move the entire "group"
up when the user clicks in the text field behind the keyboard? This way
only the fields under a keyboard would trigger the group to move up showing
the objects that are behind the keyboard.
4 - In the field's script I'll also have a returnInField handler where I can
'set the focus to nothing' to dismiss the keyboard (and can also 'set the
focus to nothing' in a mouseDown handler in the card
*** Can this work where the user exits the field and the focus change
removes the keyboard and gives the expected change where the group fields
return to the normal state down and shown in the normal place?
And that's about it really - I do some other stuff in resizeStack to check
if the keyboard is showing so that the app can change orientation gracefully
with the keyboard up if the user rotates the device - and I think the final
thing to watch out for is to return everything to its proper place if the
user opened the keyboard in portrait orientation and closed it in landscape
*** In this app I set the Landscape to true with no change to portrait.
Does this help? If not then please clarify...
Thank you
Vaughn Clement
Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclement at gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address: vaughnclement or 9282549062
Ph. 928-254-9062
Cloud Hosting Registration Web Site:
https://my.oditech.com/cart.php?a=add&pid=41
On Wed, Nov 6, 2013 at 10:26 AM, Dave Kilroy <dave at applicationinsight.com>wrote:
> Hi Vaughn
>
> In general on iOS I try to keep using LiveCode fields rather than going for
> native fields - I then have lots of functionality I'm used to - but do have
> to spend time making the field look pretty...
>
> So this is what I do:
>
> 1 - In my text entry field I make sure that 'TraversalOn' is set
> 2 - In the script of the field's card I have keyboardActivated and
> keyboardDeactivated handlers to catch the LiveCode messages and inside
> these
> I can call other handlers to move fields up and back down again catering
> for
> the keyboard
> 3 - Using the 'effective screenRect' provides the area of the app not taken
> up by the keyboard (when active) which you can use to calculate where to
> move the text entry field and other stuff to
> 4 - In the field's script I'll also have a returnInField handler where I
> can
> 'set the focus to nothing' to dismiss the keyboard (and can also 'set the
> focus to nothing' in a mouseDown handler in the card
>
> And that's about it really - I do some other stuff in resizeStack to check
> if the keyboard is showing so that the app can change orientation
> gracefully
> with the keyboard up if the user rotates the device - and I think the final
> thing to watch out for is to return everything to its proper place if the
> user opened the keyboard in portrait orientation and closed it in landscape
>
> Does this help? If not then please clarify...
>
> Dave
>
>
>
> -----
> "Some are born coders, some achieve coding, and some have coding thrust
> upon them." - William Shakespeare & Hugh Senior
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Keyboard-in-IOS-and-Field-Focus-tp4671935p4671948.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list