iPhone retina display not scaling correctly in test
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
iPhone retina display not scaling correctly in test
So I set the main stack, the blank to the correct HxW of the iPhone renta display, I imported an image the exact same size (640px X 960px) however when tested it only shows 1/4th the image as if the iPhone tester is still set for non renta displays only. What am I doing wrong, how do I give a base command to let it scale everything I import to the renta size after I import into LiveCode?
Re: iPhone retina display not scaling correctly in test
Hi tankiller,
1. welcome to the forum
2. check "iphoneUseDeviceResolution" and "iphoneDeviceScale()" in the "iOS Rlease Notes" -> LiveCode: Menu: Help
Maybe they are not set correctly.
3. I will move this thread to the iOS forum now
Best
Klaus
1. welcome to the forum

2. check "iphoneUseDeviceResolution" and "iphoneDeviceScale()" in the "iOS Rlease Notes" -> LiveCode: Menu: Help
Maybe they are not set correctly.
3. I will move this thread to the iOS forum now

Best
Klaus
Re: iPhone retina display not scaling correctly in test
I read up on those and it made very little sense to me but I added both those commands in the code editor and it fixed nothing. I'm used to coding websites but I'm finding this very hard.
Re: iPhone retina display not scaling correctly in test
Hi tankiller,
ah, ok, I was just guessing, sice I do not develop for iOS (yet).
Best
Klaus
ah, ok, I was just guessing, sice I do not develop for iOS (yet).
Best
Klaus
Re: iPhone retina display not scaling correctly in test
You might put together a simple stack with a field to log information, and check the settings in your simulator device (I'm assuming this is in the simulator)
Put a button and a field.
In the script of the button put something like:
Make sure the values are what you expect for a retina display.
LIke Klaus, I can't actually check any of this stuff since I don't work with ios, but I did some reading.. When the simluator window is open does it show "retina" as part of the title bar? ( as in the lower image on this page http://stackoverflow.com/questions/5710 ... -simulator )
Make sure you have the line klaus recommended:
iphoneUseDeviceResolution true,true -- I think if you want to deal entirely in pixels this is the setting to use.
Good luck.
Put a button and a field.
In the script of the button put something like:
Code: Select all
on mouseUp
put empty into field 1
put "Device res (in pixels): " & iphonedeviceresolution() & return after field 1
put "The screenrect:" && the screenrect & return after field 1
put "Scale (2 = retina, 1 = standard):" && iphoneDeviceScale() & return after field 1
put "Any other stuff you want to check:" & return after field 1
end mouseUp
LIke Klaus, I can't actually check any of this stuff since I don't work with ios, but I did some reading.. When the simluator window is open does it show "retina" as part of the title bar? ( as in the lower image on this page http://stackoverflow.com/questions/5710 ... -simulator )
Make sure you have the line klaus recommended:
iphoneUseDeviceResolution true,true -- I think if you want to deal entirely in pixels this is the setting to use.
Good luck.
Re: iPhone retina display not scaling correctly in test
Hi tankiller,
I've faced the exact same issue a little while ago.
Copy & Paste this code:
And if you want your app more flexible;
I mean supporting all iOS devices in different manners,
a wider view for iPad and maybe a more narrow and cozy view for iPhone,
then try to use different substacks for each device.
That was my solution...
Regards,
~ Ender Nafi
I've faced the exact same issue a little while ago.
Copy & Paste this code:
Code: Select all
on preOpenStack
if the environment is "mobile" then
iphoneUseDeviceResolution "true", "true"
set the acceleratedRendering of this stack to "true"
end if
end preOpenStack
I mean supporting all iOS devices in different manners,
a wider view for iPad and maybe a more narrow and cozy view for iPhone,
then try to use different substacks for each device.
That was my solution...
Regards,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: iPhone retina display not scaling correctly in test
Oops, I forgot to mention that you have to choose "Retina Display" from the "Device" menu of your iPhone Simulator app.
Or you may try your app on an actual device with retina display, of course.
Regards,
~ Ender Nafi
Or you may try your app on an actual device with retina display, of course.
Regards,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: iPhone retina display not scaling correctly in test
Code: Select all
on preOpenStack
if the environment is "mobile" then
iphoneUseDeviceResolution "true", "true"
set the acceleratedRendering of this stack to "true"
end if
end preOpenStack

Re: iPhone retina display not scaling correctly in test
Could you send a sample stack?
I mean sample
, not your actual app;
it would be too complicated.
Please strip out irrelevant parts and your proprietary codes.
I -or maybe someone more experienced- can look over your stack for any unnoticed mistakes.
Regards,
~ Ender Nafi
I mean sample

it would be too complicated.
Please strip out irrelevant parts and your proprietary codes.
I -or maybe someone more experienced- can look over your stack for any unnoticed mistakes.
Regards,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
Re: iPhone retina display not scaling correctly in test
The website is not letting me post any links to my dropbox folder. How can I send these do you?
Re: iPhone retina display not scaling correctly in test
Hi tankiller,
Click on my username, then my profile page will open.
There you can see my e-mail.
It's not jabber, don't confuse
, it's ol' good gmail address 
You can send your files to that address.
I hope I can help.
Regards,
~ Ender Nafi
Click on my username, then my profile page will open.
There you can see my e-mail.
It's not jabber, don't confuse


You can send your files to that address.
I hope I can help.
Regards,
~ Ender Nafi
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8