Page 1 of 1

Can't resize screen for both portrait and landscape

Posted: Fri Jul 03, 2015 4:20 am
by SusanB
I'm using the magical script below to fix the problem of resizing on the different iPhones. But it only works for Portrait orientation. The landscape cards are broken up and not resized or reoriented. (Orientation changes do work if I don't include the fullscreenmode code in preopenStack, but resizing doesn't work, then.) I would be so grateful if anyone can share some insights into solving this problem. I'm attaching a screenshot of a landscape card.
iOS Simulator Screen Shot Jul 2, 2015, 7.14.01 PM.png
on preopenStack
if the environment is "mobile" then

set the fullscreenmode of me to "letterBox"
set the acceleratedrendering of me to true
end if
end preopenStack

Re: Can't resize screen for both portrait and landscape

Posted: Sat Jul 04, 2015 1:35 pm
by dave.kilroy
Hi SusanB - I've just checked the dictionary and apparently "letterbox" preserves the aspect ratio - so if you want orientation changes in you app you'll have to choose a different setting for fullscreenmode (perhaps "noborder"? but each option has different benefits and downsides...)

fullscreenmode is not a 'silver bullet' that solves EVERY issue. Depending on what you are trying to achieve it's likely you'll need code that keeps your GUI nice that lives inside (or is called from) resizestack handlers in each card's preopencard events

Let us know how you get on and come back with questions if you need to

Dave

Re: Can't resize screen for both portrait and landscape

Posted: Wed Jul 22, 2015 7:34 pm
by SusanB
Thank you , Dave! It turns out I had the setting of each card's "set the width and height" within "If environment is development". I commented out the "if environment is development "in the preopencard script of each card, and everything is now fine. What a relief!!

Re: Can't resize screen for both portrait and landscape

Posted: Thu Jul 23, 2015 11:33 am
by dave.kilroy
Well done - there's nothing like the feeling when you fix a hard-to-fix bug!