Multiple Resolutions....help! again

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
scotttyang
Posts: 125
Joined: Sat Jan 31, 2009 12:01 am

Multiple Resolutions....help! again

Post by scotttyang » Tue Oct 16, 2012 12:19 am

I've avoided the multiple resolutions for iOS apps, and primarily focused in iPads. But now with 3 different sizes, or you will 5 different sizes with the iPhone5, I need to create an app with Multi-stacks for each resolution. My design for this spanish app is to have a stack for the resolution for iphone/ipod, the iPad, and the new iphone 5 resolution.

But am having difficulty in creating the opening stack that will look at the resolution ...iphoneDeviceResolution()...and then open the appropriate stack for the device.

Can anyone post the script or the stack that will open up the appropriate stack for the appropriate resolution.

Also Is it to imbed as a substack under stacks properties or to copy files under the standalone settings?

Scott

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Multiple Resolutions....help! again

Post by Klaus » Tue Oct 16, 2012 11:06 am

Hi Scott,
scotttyang wrote:But am having difficulty in creating the opening stack that will look at the resolution ...iphoneDeviceResolution()...and then open the appropriate stack for the device.
Can anyone post the script or the stack that will open up the appropriate stack for the appropriate resolution.
create a stack and put this into its stack script, it just checks the resolution and acts accordingly :D :

Code: Select all

on preopenstack
    switch iPhoneDeviceResolution()
        case "320,480" ## iPhome/iPod Touch NON retina
             go stack "the one that fits iphone non retina"
           break
       case "640,960" ## retina iphone
            go stack "retina stuff iphone"
          break
      case "1024,768" # iPad NON retina
          go stack "ipad non retina"
        break
       case "2048,1536"
           go stack "iPad retina"
         break
      case "6000,4000"
          answer "You must be kidding!"
        break
  end switch
end preopenstack
scotttyang wrote:Also Is it to imbed as a substack under stacks properties or to copy files under the standalone settings?
That's a matter of personal taste :D
I would use substacks so I will only have ONE file for the standalone.

MOST IMPORTANT:
Put all the logics (scripts) into the mainstack to avoid redundancy! 8)


Best

Klaus

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Multiple Resolutions....help! again

Post by JosepM » Tue Oct 16, 2012 12:02 pm

Hi Scott,

Yes, I'm also use only one stack with substacks.

Just curiosity. "My design for this spanish app". What kind of app are you designing?

If you need help for spanish translations I can help you :)

Salut,
Josep M

Post Reply