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
2010-08-01 21:53:33
Yes, I tried that, but it didn't do anything. Is there something else that needs to be done to make this work?
awakeFromNib
2010-08-01 22:17:49
Try doing a clean build and resetting the simulator before running. Perhaps your changes aren't getting to the simulator.
Lou Franco
2010-08-01 22:31:18
Also, is your PNG definitely not corrupt?
Lou Franco
2010-08-01 22:31:48
How can the PNG be checked for corruption? I just took a JPG and saved it as a PNG.
awakeFromNib
2010-08-02 00:18:29
Doing a clean build is what fixed the problem.
awakeFromNib
2010-08-02 00:19:51
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
2010-08-01 23:28:15
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
2010-08-02 00:15:37