Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
UIImageView shows in simulator, does not show on device
When I'm running it on the simulator all images are shown fine. When building and running on the device, only the "sea" image is shown.
I've tried cleaning and re-building, changing the order of the images, looking for lowercase/uppercase issues... All seems fine. What could be the problem, and more importantly, how could this be fixed?
When I've had problems like this, that were not related to spelling/capitalization, it's usually due to a corrupt image. I just open the .png in a graphics editor and resave it as the same name. Sometimes I guess the png gets corrupted where the simulator can still read it, but not the device.
When I've had problems like this, that were not related to spelling/capitalization, it's usually due to a corrupt image. I just open the .png in a graphics editor and resave it as the same name. Sometimes I guess the png gets corrupted where the simulator can still read it, but not the device.
Maybe I should try with jpegs, just to see what happens.
Got the same frustrating issue -got 3 PNGs on UIImage, shows on simulator, but not on device. And it used to show on the device, modified the code, reinstalled on the device and it stopped showing.
The thing that's weird, I copied this program to Prog B, copied the same 3 PNGs and given different names, plus 2 more PNGs for Prog B. On the simulator, Prog A and Prog B PNGs show up, but on the device, only Prog B images, not Prog A!! Take note, I use the same UIViewController: Prog A and Prog B calls the same UIViewController, the only thing different is Prog A and Prog B pass a different filename prefix to the controller. I'm so stumped!! :confused::rolleyes:
Are the filenames correct? And keep in mind the filesystem on device is case sensitive. "Test.png" and "test.png" would be two different files on a device.
You're right baja_yu - it's filename but stupid me, it's the file prefix I passed! I missed 1 letter: UguidePage - g should have been a CAP. That's why it's a consistent bug!! :D Duh!!
Are the filenames correct? And keep in mind the filesystem on device is case sensitive. "Test.png" and "test.png" would be two different files on a device.
I just encountered a very similar problem; thought I'd share to save someone else wasting an hour like I just did trying to solve the problem!
[email]image@2X.png[/email] is NOT the same as [email]image@2x.png[/email] :D
I wonder how many thousands of programmer-hours us iOS developers have wasted because of the case-sensitivity of the iOS file system. I would cheerfully strangle the developer at Apple that decided to make the case sensitivity of iOS different from Mac OS (and thus different from the simulator.) I personally think case sensitive filenames are a very, very bad idea.
My other pet peeve is the screwed up coordinate system in the graphics engine in iOS. Mac OS consistently places 0,0 at the lower left, increasing as you to go up and to the right.
iOS is MOSTLY upside-down from that, but it isn't even consistent with itself!!! UIKit objects place 0,0 at the top left, and CALayers place it at the bottom left! WTF?!? Again, the programmers responsible should be shot. (this is, of course, hyperbole. I'm not really advocating violence, just expressing frustration.)
Regards,
Duncan C WareTo
Animated GIF created with Face Dancer, available for free in the app store.
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThe thing that's weird, I copied this program to Prog B, copied the same 3 PNGs and given different names, plus 2 more PNGs for Prog B. On the simulator, Prog A and Prog B PNGs show up, but on the device, only Prog B images, not Prog A!! Take note, I use the same UIViewController: Prog A and Prog B calls the same UIViewController, the only thing different is Prog A and Prog B pass a different filename prefix to the controller. I'm so stumped!! :confused::rolleyes:
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome[email]image@2X.png[/email] is NOT the same as [email]image@2x.png[/email] :D
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeMy other pet peeve is the screwed up coordinate system in the graphics engine in iOS. Mac OS consistently places 0,0 at the lower left, increasing as you to go up and to the right.
iOS is MOSTLY upside-down from that, but it isn't even consistent with itself!!! UIKit objects place 0,0 at the top left, and CALayers place it at the bottom left! WTF?!? Again, the programmers responsible should be shot. (this is, of course, hyperbole. I'm not really advocating violence, just expressing frustration.)
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome