popovers and that auto locating arrow

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Coffee1633
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 219
Joined: Mon Dec 05, 2011 5:35 pm

popovers and that auto locating arrow

Post by Coffee1633 » Wed Jun 26, 2013 1:57 am

I noticed recently that popovers are starting to be used in iphone apps, too. For example dropbox has them (see attached image). I can't figure out how you would go about creating them in LC. Is it possible to create popovers for iphone or ipad for that matter (especially with the little arrow pointing to the control which the popover came from, automatically pointing to the correct spot)?

I see that there is a popup command so would I have to make a custom graphic with the arrow in the appropriate location for each button? But what about resizing and orientations changes? It would be nice to have a popover command that auto locates the arrow under the control that called it. Is that possible in LC at the moment?

coffee16
Attachments
iphone popover.jpg

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: popovers and that auto locating arrow

Post by Jellicle » Wed Jun 26, 2013 2:56 am

You can make the popover a group and include an image for the background, 2 transparent buttons for the buttons and a graphic object for the arrow. Then when you call your script to show the popover just include a parameter that specifies the location of the arrow. Something like:

on showPopover button1Label,button2Label, arrowLoc
set the label of btn 1 of group "popover" to button1Label
set the label of btn 2 of group "popover" to button2Label
set the loc of graphic "arrow" of group "popover" to 550,96
end showPopover

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Coffee1633
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 219
Joined: Mon Dec 05, 2011 5:35 pm

Re: popovers and that auto locating arrow

Post by Coffee1633 » Wed Jun 26, 2013 3:40 am

Thanks Gerry, good design idea. Very straight forward. I'll give it a try.

coffee16

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: popovers and that auto locating arrow

Post by monte » Sun Jun 30, 2013 9:46 pm

You could always try mergPop ;-) Only iPad though. On iPhone popovers are not standard.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply