Page 1 of 1
Screen size question
Posted: Fri Apr 22, 2016 9:59 pm
by Pistris
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.
Re: Screen size question
Posted: Sat Apr 23, 2016 5:31 am
by Simon
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
Re: Screen size question
Posted: Mon Apr 25, 2016 10:57 pm
by Pistris
Thank you simon
everything is clear now
Edd.
Re: Screen size question
Posted: Tue Apr 26, 2016 3:53 am
by quailcreek
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.
Re: Screen size question
Posted: Thu Apr 28, 2016 2:32 am
by Pistris
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.
Re: Screen size question
Posted: Thu Sep 01, 2016 11:33 pm
by Pistris
UPDATE
If you add splash screens with correct sizes on the standalone builder then you will be able
to work on all resolutions correctly
Re: Screen size question
Posted: Fri Sep 02, 2016 1:19 pm
by teacherguy
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).
Re: Screen size question
Posted: Wed Sep 07, 2016 11:18 pm
by Pistris
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
Re: Screen size question
Posted: Thu Sep 08, 2016 9:03 pm
by teacherguy