How do you load images for landscape and portrait positions?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Knightlite
Posts: 51
Joined: Mon Jan 23, 2012 10:14 pm

How do you load images for landscape and portrait positions?

Post by Knightlite » Sun Mar 30, 2014 11:02 pm

Hi,

I am writing an iPad app with an image used for the background. I have two images. One for portrait and the other for landscape. I am also using MobGui. I was wondering if there was any easy way to load the correct image at development time depending on the orientation of the IDE? Or does it have to be done at runtime in code? If it has to be done at runtime, could anyone direct me to how I can do this. I am pretty confused on how to do this and have been working all day on the problem.

Any help would be greatly appreciated.

Jim

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: How do you load images for landscape and portrait positi

Post by Simon » Mon Mar 31, 2014 12:08 am

Hi Jim,
Check out "orientationChanged" and "mobileDeviceOrientation" in the dictionary.
That will tell you what image to select.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply