I download开发者_如何转开发ed few images from google and converted them to PNG using the windows paint (xp) application. Later i copied them to my mac machine and deployed the application with my new image. It is properly displayed in the simulator. Later I connected my iphone and deployed on the device. All images are displayed except this one. What has to be done ?
Make sure you really converted the image and not just renamed the extension, renaming the extension may cause the image to be displayed in the emulator but not on the device.
iPhone OS is case sensitive so if your image name is "myImage.png" then "myimage.png" would work on the simulator but not on the device.
Clean the build and try to run the app once again.Check there is no two image on the same name also.
All the best.
Make sure you're using the same target for simulator and device builds. If not, check that the image file is added to that target.
Maybe after several renaming you have a different name for the real file and the xcode reference.
I would suggest to delete the file from the project and from the disk and reimport it. Then check if the name is the same as that into your code.
Check the image format. Name of the image should be Icon.png and not .PNG . I faced the same issue . Every thing was solved when I used the .png image with exact 57 * 57 pixel size. I cleaned all the builds and rebuilt again , and it worked for me .
精彩评论