Drag?Swipe?What???

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sbonham
Posts: 16
Joined: Wed May 17, 2006 3:29 pm

Drag?Swipe?What???

Post by sbonham » Tue Sep 10, 2013 1:28 am

Hi Livecoders,

I'm back using Rev/LiveCode again after about five years away. This time creating an app for iPhone/iPad users... perhaps Android users too eventually.

Here's the deal I have created a main menu that provides links to 33 other cards - and each card has a link back to the main menu.
You can view a sample of one of the 33 cards at:
Slide3.png
This is a "Storyboard" image not a screen cap. The blue arrow and the text in the upper right are not part of the livecode interface.

Each of the 33 cards has a large PNG image on it. The dimensions of each gymnastics sequence image vary in width but not in height.
I want users to be able to scroll the image left to right and to be able to zoom in to a desired area. In the Floor Exercise image there are over 100 illustrations - only 9 are fully displayed in the window here.

A few questions (forgive me I'm new to the iPhone/iPad world - and rusty in livecode):
1. What am I trying to do here in the iOS world? Drag or Swipe? Pinch? ZoomIn? ZoomOut??? or something else??
2. Does anyone have a livecode project doing similar things? Can they share some code? Or point me to useful details?
3. Lastly - I'd appreciate some advice on the image format and the smartest approach for serving universal access. Does that mean I should make all images with a height of 640 (to serve the iPad retina display)- with dpi/ppi of 326? Won't those be enormous files?

Thanks for any advice,
Steve

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

Re: Drag?Swipe?What???

Post by Jellicle » Tue Sep 10, 2013 9:23 am

sbonham wrote:Hi Livecoders,
Welcome to the mad house.
sbonham wrote: 1. What am I trying to do here in the iOS world? Drag or Swipe? Pinch? ZoomIn? ZoomOut??? or something else??
Sounds like your users would swipe or drag the image backwards and forwards across the screen, and would use the pinch gesture to zoom in and out of the image.
sbonham wrote: 2. Does anyone have a livecode project doing similar things? Can they share some code? Or point me to useful details?
I'd look at using a native browser control - they can be used to display a .jpg file and can be set up to permit movement in one dimension, pinch zoom etc.
sbonham wrote: 3. Lastly - I'd appreciate some advice on the image format and the smartest approach for serving universal access. Does that mean I should make all images with a height of 640 (to serve the iPad retina display)- with dpi/ppi of 326? Won't those be enormous files?
For it to look good on different resolution devices you'll need to provide multiple image files and swap them in and out in code - so put some work into optimising them :)

Gerry

Thanks for any advice,
Steve[/quote]
Last edited by Jellicle on Tue Sep 10, 2013 1:19 pm, edited 1 time in total.
14" MacBook Pro
Former LiveCode developer.
Now recovering.

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

Re: Drag?Swipe?What???

Post by Jellicle » Tue Sep 10, 2013 9:53 am

Here's a quick example of the method I described - it loads an image from the web. Unfortunately there doesn't seem to be a way to suppress the vertical and horizontal scroll indicators

The other method I've used has involved a native scroller object - unfortunately that can't do pinch zooming

Cheers

Gerry
Attachments
imageScroller.zip
(1.89 KiB) Downloaded 278 times
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply