xcode 如何正确添加这三个文件?iPhone/iPad 通用应用程序的“Default.png, [email protected], [email protected]”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15894176/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:10:22  来源:igfitidea点击:

How to add these three files properly?"Default.png, [email protected], [email protected]" for universal app for iPhone/iPad?

iphoneiosxcodesplash-screendefault.png

提问by Afreen Khan

I added "Default.png, [email protected], [email protected]" 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.

我在我的启动图像通用项目中添加了“Default.png, [email protected], [email protected]”这三个文件,我有三个不同的图像,分辨率与苹果文档中提到的完全相同,对于iPad 768 * 1024 , iphone-4s -> 320 * 480 , 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 [email protected]. The [email protected] 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.

但我的问题是,当我在 iphone4s-iphone5 上朗姆酒时,启动朗姆酒正确,但是当我在 Ipad 上运行时,Deafault.png 启动画面没有显示,而不是参考 [email protected]。默认 [email protected] 显示在 iPad 上而不是 Deafault.png 并且图像在 ipad 上也变得模糊和缩小,因为 Deafault.png 没有显示。如何解决这个问题。

Any Idea or suggestion from experts would be highly welcome.

非常欢迎专家的任何想法或建议。

回答by Vedchi

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

对于通用应用程序,启动图像命名应该类似于这样。

iPhone > Default~iPhone.png,Default@2x~iPhone.png & [email protected].
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

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

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

回答by Maheta Dhaval K

  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. ` enter image description here
  1. 首先我想建议的是,
  2. 准备所有图像,
  3. 从项目导航器中选择项目并转到摘要并向下滚动出现此屏幕,然后右键单击该屏幕并从您的计算机中选择文件,它会自动复制到项目中,并且也会输入到 plist 文件中。
  4. 如果您的应用程序是通用的,那么您必须为 iPhone 和 iPad 都设置。` 在此处输入图片说明

回答by Kevin

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

请参阅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.

只有您应该做的是将启动图像设置为具有相对大小的正确名称,然后将这些图像添加到项目中。Xcode 将帮助您在应用程序启动时正确显示它。