views:

126

answers:

2

All I have to do to show a splash screen in a view-based application is drag an image into the resources folder and name it default.png, correct? This is what I did, but the image doesn't show.

+1  A: 

When you added it, did you tell it to copy to output location? It was a checkbox on the dialog that showed up after you added it. Try readding and make sure this checkbox is checked.

UPDATE from comments: a clean build fixed the problem

Lou Franco
Yes, I tried that, but it didn't do anything. Is there something else that needs to be done to make this work?
awakeFromNib
Try doing a clean build and resetting the simulator before running. Perhaps your changes aren't getting to the simulator.
Lou Franco
Also, is your PNG definitely not corrupt?
Lou Franco
How can the PNG be checked for corruption? I just took a JPG and saved it as a PNG.
awakeFromNib
Doing a clean build is what fixed the problem.
awakeFromNib
A: 

It sounds like what you are doing is correct, but reading through the documentation might help you work out what the problem is.

Perhaps your Default.png is not in the root of your bundle? To check, expand the Products section in the Groups & Files panel, then select Reveal in Finder from the context menu. Then right click on the app bundle in Finder, and select Show Package Contents. You should see your Default.png listed there.

Douglas
When I reveal the file in finder, I can see it is there in the same directory as the app bundle. But when I show the package contents of the app bundle I don't see it in there.
awakeFromNib