views:

593

answers:

6

When the app loads, if we want an image to be displayed we use one named Default.png. And I used it for icon too. But are working fine in simulator.

But when I try it in device at both places its blank. Can anyone sort me out of this?

A: 

Check the case of the file. It needs to have a capital D. On the simulator Default.png and default.png are the same but not on the device.

DHamrick
Ya, its capital D only. But to no effect.
wolverine
A: 

Try removing the application from the device and reinstalling. I know, silly, but sometime's fixes xcode/device issues.

Mr-sk
Tried it so many times to no result. Even after doing all correctly, don't understand whats with it now!!!
wolverine
A: 

Please check if the size of your Default.png is 320*480 and if you have converted it from any other format, make sure you have not just renamed but properly re-saved the image in png format.

Hope this helps.

Thanks,

Madhup

Madhup
+1  A: 

Try cleaning your project using this button

alt text

And then reinstall the app...

gcamp
Thanks for showing this button. I clean-all really often but never thought of putting it on my toolbar! I also think this answers Wolverine's quiestion if he is using a png file called `Default.png`. Anyway, thanks again :)
Dimitris
A: 

According to Apple HIG your Icon.png should be of 57 x 57 pixels, with 90 degree corners. and Default.png should be of 320 x 480 pixels.For more info follow MobileHIG

For splash screen

  1. Add simply a Default.png to your project’s Resource folder.

For icon

2.Add a icon.png to your Info.plist

i.e. Key = Icon file , Value = icon.png

3.If all this doesn't work then delete the build folder and rebuild your application (but before build press Clean All button in xcode).

4.If this also doesn't work the change image name to default.png ( not Default.png)

raaz
It was a problem with the image. Seeing you iterate all the steps that i have done made me confirmed that what i were doing was right. So checked the image and it was corrupted. Now everything is working fine.
wolverine
I am happy to see you have got the solution finally.
raaz
A: 

Yes, I think it's because of the "capital D" issue. I've seen the same problem with UIImageView.

Xie Wei
Well, if you've had an issue with filenames, it had nothing to do with `UIImageView`, which, as a View object, is ignorant of the file its image came from. You may have had this issue with `UIImage`, though. I am being sort of nit-picky, but accuracy is important.
Jonathan Sterling