Page 1 of 1

Using entire iPhone X screen

Posted: Wed Mar 25, 2020 11:44 am
by j9v6
So I've used LiveCode to build Windows desktop apps and am now venturing into mobile apps on the iPhone platform. As I have an iPhone Xr I'm using that as my target device in the simulator and when deploying to my device to test. I'm keeping this real simple and just have a "Hello World" app that just displays some text on the screen. It appears that even if I size the LC stack to the dimensions of the iPhone Xr the rendered app doesn't fill the entire screen. I get a black band at the top and another at the bottom. (see image)
iPhone-Test.png
I only have 3 lines of code in my test app at the moment in the stack itself

Code: Select all

on preOpenStack
	set the fullscreenmode of this stack to "exactFit"
end preOpenStack
How do I fill the entire screen and use the top and bottom areas? I feel like I'm missing something really obvious here.
Thanks for any pointers.
Al.

Re: Using entire iPhone X screen

Posted: Wed Mar 25, 2020 3:59 pm
by LiveCode_Panos
Hello Al,

You need to add splash images of the appropriate dimensions for this device. See the iOS standalone settings.

Kind regards,
Panos
--

Re: Using entire iPhone X screen

Posted: Wed Mar 25, 2020 5:57 pm
by jacque
Also, "exact fit" will distort the content if the screen isn't the same size ratio as the stack. ShowAll or noBorder are better choices, however these will also leave some blank areas if the ratios don't match. Setting a background color on the stack can alleviate some of that.

Re: Using entire iPhone X screen

Posted: Wed Mar 25, 2020 6:10 pm
by j9v6
Thanks Panos. That works!