How to add these three files properly?“Default.png, Default-568h@2x.png, Default@2x.png” for universal app for iPhone/iPad?

六眼飞鱼酱① 提交于 2019-12-12 20:21:16

问题


I added "Default.png, Default-568h@2x.png, Default@2x.png" these three files in my universal project for splash image, I have three diffrent image and the resolution exactly the same as mention in apple docs, for iPad 768 * 1024 , for iphone-4s -> 320 * 480 , for iphone 5-> 640 * 1136.

But my problem is that when I rum on iphone4s- iphone5 the splash rum properly, but when I run on Ipad the Deafault.png splash not showing instead of it takes reference from Default-568h@2x.png. The Default-568h@2x.png is showing on the iPad instead of Deafault.png and the image got blur and shrink on ipad also, beacuse Deafault.png not showing. How to slove this problem.

Any Idea or suggestion from experts would be highly welcome.


回答1:


  1. First I would like to suggest that,
  2. Preapre all Images,
  3. Select Project from Project Navigator And Go to Summary and scroll down this screen appears, then right click on that and choose file from your computer it will automatically copied to project and it will entered in plist file also..
  4. if your application is universal then you have to set for iPhone and iPad Both. `




回答2:


Launch image naming should be similar like this for universal application.

iPhone > Default~iPhone.png,Default@2x~iPhone.png & Default-568h@2x.png.
iPad > Default-Portrait~iPad.png,Default-Portrait@2x~iPad.png,Default-Landscape~iPad.png,Default-Landscape@2x~iPad.png

Please refere the following link for more details regarding image resolutions

http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html

and for image naming conventions use the following link

http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html




回答3:


See the offical document at chapter App Launch (Default) Images: App Launch (Default) Images

Only you should do is set the launch image a proper name with relative size, then add those images to the project. Xcode will help you to display it correctly when app launching.



来源:https://stackoverflow.com/questions/15894176/how-to-add-these-three-files-properlydefault-png-default-568h2x-png-default

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