Default.png shows in simulator but not on real device iphone?

Deadly 提交于 2019-12-22 04:19:19

问题


i have added a splash screen to my application by adding Default.png. the splash screen works fine in the simulator but not showing on real device


回答1:


Check the case of the file name.

Default.png, default.png, Default.PNG and DEFAULT.png are all different files on the device, but not in the simulator.




回答2:


The file name must be Default.png (with a capital D). Also, do a clean/rebuild of the entire project to ensure the most recent version of the file is being included in the project.




回答3:


Make a "Default.png" file (with a capital "D"). Then clean all targets and build again.




回答4:


Sometimes this issue hapens, when .png file was renamed from .jpg file. So, for example, you had image.jpg, you've renamed in to image.png, and using this image.png. It'll be correctly displayed in simulator, and won't work on device




回答5:


Make sure the name of the file begins with a capital "D", then clean and rebuild.




回答6:


Select your Default.png in the groups and files window and make sure in the file listing above the editor window that the checkbox on the far right is checked. Without this the file will not be copied to the application bundle after compilation is finished.



来源:https://stackoverflow.com/questions/1067998/default-png-shows-in-simulator-but-not-on-real-device-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!