Xcode:iPhone 5 App启动图像未更新

时间:2013-06-05 00:44:53

标签: iphone ios xcode cordova

我正在使用Cordova / PhoneGap构建应用程序,并在Xcode中添加了我的应用程序启动图像。

但是,在我的iPhone 5上测试时,启动图像似乎没有改变 - 它仍然显示默认的Cordova版本。

我正在运行Xcode版本4.6.2,我认为它是最新版本,它确实有4“iPhone 5图像的空间 - 当我在手机上测试时它不会出现。

我使用的图像是640x1136,如文档中所述。

有人知道为什么会这样吗?

谢谢!

编辑:

我注意到会出现警告:

/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.

它指的是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;
}

5 个答案:

答案 0 :(得分:3)

  1. 清洁然后再建造。
  2. 从模拟器/设备
  3. 删除应用程序
  4. 确保您的图像文件名应为Default-568h@2x.png
  5. 分辨率应该是640x1136。

答案 1 :(得分:0)

你需要为你的图像文件添加-568h @ 2x后缀,所以它看起来像:

default-568h@2x.png

然后从finder拖动并将其放入目标摘要的启动图像部分。

答案 2 :(得分:0)

更改启动图像时遇到类似问题。

尝试清理构建文件和构建文件夹(cmd+option+k and cmd+option+shift+k)

您也可以尝试清除“DerivedData”

  

(/用户/ youruser /库/开发商/ Xcode中/ DerivedData)

文件夹和“文件夹”(/private/var/folders)

答案 3 :(得分:0)

基本上,当您在iOS设备上运行时,名称区分大小写。所以你的图像文件名应该是Default-568h@2x.png,分辨率应该是640x1136。

答案 4 :(得分:0)

更新<your_project_name>/Resources/splash

中的图片