Page 1 of 1

How do you load images for landscape and portrait positions?

Posted: Sun Mar 30, 2014 11:02 pm
by Knightlite
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

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

Posted: Mon Mar 31, 2014 12:08 am
by Simon
Hi Jim,
Check out "orientationChanged" and "mobileDeviceOrientation" in the dictionary.
That will tell you what image to select.

Simon