Using entire iPhone X screen

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
j9v6
Posts: 10
Joined: Tue Aug 06, 2019 9:27 am

Using entire iPhone X screen

Post by j9v6 » Wed Mar 25, 2020 11:44 am

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.

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 658
Joined: Fri Feb 06, 2015 4:03 pm

Re: Using entire iPhone X screen

Post by LiveCode_Panos » Wed Mar 25, 2020 3:59 pm

Hello Al,

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

Kind regards,
Panos
--

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5344
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Using entire iPhone X screen

Post by jacque » Wed Mar 25, 2020 5:57 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

j9v6
Posts: 10
Joined: Tue Aug 06, 2019 9:27 am

Re: Using entire iPhone X screen

Post by j9v6 » Wed Mar 25, 2020 6:10 pm

Thanks Panos. That works!

Post Reply

Return to “iOS Deployment”