Xcode:iPhone 5 应用程序启动图像未更新
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16929796/
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
Xcode: iPhone 5 App Launch image not updating
提问by MeltingDog
I am building an app with Cordova/PhoneGap and have added my app Launch Images in Xcode.
我正在使用 Cordova/PhoneGap 构建一个应用程序,并在 Xcode 中添加了我的应用程序启动图像。
However, when testing on my iPhone 5 the launch image does not appear to be changed - it still shows the default Cordova version.
但是,在我的 iPhone 5 上测试时,启动图像似乎没有改变——它仍然显示默认的 Cordova 版本。
I am running Xcode version 4.6.2 which I believe is the latest and it does have a space for the 4" iPhone 5 image - its just not appearing when I test on the phone.
我正在运行 Xcode 版本 4.6.2,我认为它是最新的,并且它确实有用于 4" iPhone 5 图像的空间 - 当我在手机上测试时它没有出现。
The image Ive used is 640x1136 as specified in the documentation.
我使用的图像是文档中指定的 640x1136。
Would anyone know why this is occurring?
有谁知道为什么会这样?
Thanks!
谢谢!
EDIT:
编辑:
I have noticed a warning that appears:
我注意到出现了一个警告:
/Users/me/Documents/Cordova27/app/app/Classes/AppDelegate.m:80:25: 'useSplashScreen' is deprecated: Deprecated in Cordova 2.5. Add/Remove the SplashScreen plugin instead of setting this property.
It is referring to this line in the AppDelegate.M file:
它指的是 AppDelegate.M 文件中的这一行:
#endif
self.viewController.useSplashScreen = YES;
// Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
// If necessary, uncomment the line below to override it.
// self.viewController.startPage = @"index.html";
// NOTE: To customize the view's frame size (which defaults to full screen), override
// [self.viewController viewWillAppear:] in your view controller.
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
回答by Kalaichelvan
- Clean and then build.
- Delete the app from simulator/device
- Ensure your image file name should be [email protected]
- Resolution should be exactly 640x1136.
- 清洁然后构建。
- 从模拟器/设备中删除应用程序
- 确保您的图像文件名应为 [email protected]
- 分辨率应该正好是 640x1136。
回答by Live2Enjoy7
you need to add -568h@2x suffix to your image file, so it would look like:
你需要在你的图像文件中添加 -568h@2x 后缀,所以它看起来像:
then you drag from finder and drop it into launch images section of the target summary.
然后从 finder 拖放到目标摘要的启动图像部分。
回答by Ben Avery
I have had similar problems when changing the launch image.
我在更改启动图像时遇到了类似的问题。
Try cleaning your build and the build folder (cmd+option+k and cmd+option+shift+k)
尝试清理您的构建和构建文件夹 (cmd+option+k and cmd+option+shift+k)
You could also try clearing out the "DerivedData"
您也可以尝试清除“DerivedData”
(/Users/youruser/Library/Developer/Xcode/DerivedData)
(/Users/youruser/Library/Developer/Xcode/DerivedData)
folder and "folders" (/private/var/folders)
.
文件夹和“文件夹” (/private/var/folders)
。
回答by Maverick King
Basically when you will run on iOS device the names are case sensitive. So your image file name should be [email protected] and the resolution should be exactly 640x1136.
基本上,当您在 iOS 设备上运行时,名称区分大小写。所以你的图像文件名应该是 [email protected] 并且分辨率应该是 640x1136。
回答by Jerome Jaglale
Update the images in <your_project_name>/Resources/splash
更新图像 <your_project_name>/Resources/splash