My stack is designed in the LiveCode environment for a regular (non retina) iOS display
My directory structure look like this:
./assets/iphone/
.assets/iphoneX2/
The stack uses images from ./assets/iphone/ and the images in the iPhone and iphoneX2 directory have the same names, just different dimensions for the different screen sizes.
If I detect that I am running on a retina display, my code loops through all my images and replaces /iphone/ in the filename with /iphoneX2/
I then re-position the images and various other positioning things
In the simulator, this all works just fine. The retina images get brought in and the app works fine.
The moment I deploy to a retina device, I hit trouble. None of the images display.
They are definitely being copied over to the device, so that is not the problem.
Any suggestions to get these images to show would be most gratefully received!
Regards
Seamus
Images not displaying on device, OK in simulator
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 11
- Joined: Mon Dec 13, 2010 4:12 pm
Re: Images not displaying on device, OK in simulator
This is almost always a file path issue. What are you using in your script to get the image paths? is it using specialFolderPath("engine") rather than the dot-slash at the front?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 11
- Joined: Mon Dec 13, 2010 4:12 pm
Re: Images not displaying on device, OK in simulator
Bingo!
I am kicking myself as this was a solution I solved 10 months ago for getting to audio files and I had completely forgotten.
So,my code looks like this:
In essence, what this does is loop through all the images on the card and replaces them with the X2 version.
Many thanks for the tip.
I am kicking myself as this was a solution I solved 10 months ago for getting to audio files and I had completely forgotten.
So,my code looks like this:
Code: Select all
repeat with x = 1 to the number of images on this card
put the topLeft of image X into localTopLeft
put the filename of image X into localFilename
replace "iphone" with "iphoneX2" in localFilename
replace "./assets/" with specialFolderPath("engine") & "/assets/" in localFilename
set the filename of image X to localFilename
set the topleft of image x to localTopLeft
end repeat
Many thanks for the tip.
Re: Images not displaying on device, OK in simulator
I wish I only forgot one thing. 

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com