Screen size question

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Screen size question

Post by Pistris » Fri Apr 22, 2016 9:59 pm

I was laying out an interface for a demo app that am not gonna publish in the app store
its just for me to show clients features and stuff they can request in apps

so since i have an iphone 6 i added the iphone 5 stack and started laying out the ui

am not using fullscreenmodes because am building for my phone only
when previewing on the simulator and my iphone i can see that a lot of elements are off screen
to the right and to the bottom i have a lot of stuff missing

screentrect gives me values that correspond to an iphone 5

whats the deal here?

thanks in advance

Edd.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Screen size question

Post by Simon » Sat Apr 23, 2016 5:31 am

I bet you this is going to be something like
useDeviceResolution
pixelScale
mobilePixelDensity
One of those... Just a guess
http://lessons.livecode.com/m/15262/l/1 ... -densities

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Screen size question

Post by Pistris » Mon Apr 25, 2016 10:57 pm

Thank you simon

everything is clear now

Edd.

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Screen size question

Post by quailcreek » Tue Apr 26, 2016 3:53 am

What version of LC are you running. I've been using LC 8 with and developing on a iPhone 5 screen size. In the sim and on my iPhone 6s everything scales perfectly. I'm not using any code to scale the UI.
Tom
MacBook Pro OS Mojave 10.14

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Screen size question

Post by Pistris » Thu Apr 28, 2016 2:32 am

am using LC 8 indy rc1

Yes if you work on stacks of size 320 x 568 you are all good

i asked because if you make a stack at native resolutions in iphones 5 retina and up your UI its not gonna look how it should, you are going to have objects out of the screen

now by doing some research i learned that there is something called logical resolution, you can see the previous posts to read more about it

if you create at stack for an iphone 6+ at 1242 x 2208 you need to use scaling
do a test and get the screenrect and you will see that the numbers it gives you dont match the actual screen resolution

you need to set to true useDeviceResolution
and then it will give you the actual resolution of the screen wich in the test case its also gonna match the stack size

no since you don't know in what device the app its going to be running you have to use the scaling features of livecode (which work pretty well)

you can supply livecode with different graphic sizes for your app and he does all the work

i have been using that feature since i started using livecode so i did not notice the discrepancy between stack resolution and actual device resolution, so i asked here and got my answer
i was not gonna be able to sleep until i figure it out LOl

Luckily the livecode community rocks.

Edd.

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Screen size question

Post by Pistris » Thu Sep 01, 2016 11:33 pm

UPDATE

If you add splash screens with correct sizes on the standalone builder then you will be able
to work on all resolutions correctly

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Screen size question

Post by teacherguy » Fri Sep 02, 2016 1:19 pm

Pistris wrote:UPDATE

If you add splash screens with correct sizes on the standalone builder then you will be able
to work on all resolutions correctly
I have been having this problem with all of my iPad apps under iOS 10. I just tried your suggestion (making the splash screen 2048x1536. No change.

The closest I can get is to use none of the various fullscreenmode settings. Then the app is properly placed, but the right side of the screen is truncated (Just a large black vertical stripe).

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Screen size question

Post by Pistris » Wed Sep 07, 2016 11:18 pm

teacherguy what does screenrect and iphonedevice resolution values you get on the ipad

i have not worked on iOS 10 yet but on all other versions i get pixel perfect images
the only thing that fixed my resolution problems was adding the splash screens in the correct pixel sizes

i do use fullscreen modes but upload all images in different resolutions so live code selects the best one and you don't have to deal with scaling images

read this http://lessons.livecode.com/m/15262/l/1 ... -densities

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Screen size question

Post by teacherguy » Thu Sep 08, 2016 9:03 pm

Bug as it relates to iOS 10 identified:

https://github.com/livecode/livecode/pull/4465

Post Reply

Return to “iOS Deployment”