Resize stack in runtime to fit the device

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Resize stack in runtime to fit the device

Post by Klaus » Tue Nov 01, 2022 2:17 pm

Hi all,

many of you will already know this, but it was new to me.
Actually the complete mobile development is new to me, got my first cellphone almost a year ago.

The "fullscreenmodes" are not really satisfying, so I went to see what other opions we might have.

Reading up many, many forum postings, LC mailinglists and the LC lesson, left the impressions to me that we could not change a stacks dimension (with/height) after the runtime is on the mobile device.

Maybe someone wrote this, but then I probably did not "get" it.
With thelp of Jacque and Brian I finally found out how straight-forward and easy that is.

So I want to share a little demo stack, in fact a non functionaly copy of the first card of my coming app.
It checks the screenrect and resizes the stack proportionally to fill the while screen.

Please check the card script, everything well commented there.
This may of course not apply to all stacks, but fits very well to my app:
Text at the top
Navigation bar at the bottom
The actual "content" in the area between these two.

Here you can see how it looks in the iOS simulator, and I have to say, it looks good! :-D
https://www.dropbox.com/sh/r34raykbqe2i ... YVzka?dl=0
Hope this will be of help for some of you.

Drop a line if you have questions.


Best

Klaus
Attachments
resize_stack_on_mobile.livecode.zip
(6.12 KiB) Downloaded 125 times

Post Reply

Return to “iOS Deployment”