PhoneGap和iPhone 6 Plus闪屏问题 [英] PhoneGap and iPhone 6 Plus splash screen issue

查看:179
本文介绍了PhoneGap和iPhone 6 Plus闪屏问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以当更新我的应用程序为iOS 8和更大的iPhone时,我注意到一个问题,我不能弄清楚如何解决。

Ok, so while updating my app for iOS 8 and the larger iPhones I noticed an issue that I can't figure out how to resolve.

在我的PhoneGap应用程序,我已经在Xcode中添加了一个新的资产库用于闪屏,我添加了两个新的图像,一个用于iPhone 6肖像和一个用于iPhone 6 Plus肖像。

In my PhoneGap app, I have added a new asset library in Xcode for the splash screens, I added two new images, one for the iPhone 6 portrait and one for the iPhone 6 Plus portrait.

他们的工作,应用程序现在不缩放,因为没有这些图像。

They work and the app now doesn't scale as it did without these images.

问题是,在iPhone 6 Plus当应用程序加载,屏幕最初看起来很好,但在一秒或两秒内它改变大小,并显示关闭屏幕,像屏幕改变其大小,现在一半的标志是关闭屏幕,有其他人看到这一点,知道如何解决它?图片是苹果指定的正确大小,因此不确定为什么它的大小会随着应用程式大小的变化而变化。

The issue is, on the iPhone 6 Plus when the app loads, the splash screen initially appears fine, but within a second or two it changes size and is displaying off the screen, like the screen changes its size and now half of the logo is off the screen, has anyone else seen this and know how to fix it? The image is the correct size as dictated by Apple, so not sure why its changing size mid app load.

推荐答案

同样的问题,我缩小到splashscreen插件( org.apache.cordova.splashscreen )。这里是我需要的步骤解决这个问题在iPhone 6& iPhone 6 +:

I was experiencing the same issue, which I narrowed down to the splashscreen plugin (org.apache.cordova.splashscreen). Here are the steps needed for me to fix the issue on both iPhone 6 & iPhone 6+:


  1. 更新到最新版本的splashscreen插件(已在GitHub上修补):

    • cordova插件remove org.apache.cordova.splashscreen

    • cordova插件添加https://github.com/apache/cordova-plugin-splashscreen.git

  1. Update to the latest version of the splashscreen plugin (which has been patched on GitHub):
    • cordova plugin remove org.apache.cordova.splashscreen
    • cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git

  • cordova平台删除ios

  • cordova平台添加ios

  • cordova build ios

  • cordova platform remove ios
  • cordova platform add ios
  • cordova build ios

看起来splashscreen插件创建一个假的splashscreen,应该完美匹配真正的iOS初始屏幕,当你调用 splashscreen.hide(),你实际上是隐藏了假的splashscreen。只是,在iPhone 6/6 +的情况下,假的启动画面是错误的,你目前得到的插件版本 cordova插件添加org.apache.cordova.splashscreen ,并且您看到图像更改大小,并在真实闪屏被隐藏后移动屏幕。

It appears that the splashscreen plugin creates a fake splashscreen that should ideally perfectly match the real iOS splashscreen, and when you call splashscreen.hide(), you're actually hiding the fake splashscreen. Just, in the case of iPhone 6/6+, the fake splashscreen is wrong with the version of the plugin you currently get with cordova plugin add org.apache.cordova.splashscreen, and you see the image change size and move off the screen once the real splashscreen is hidden.

这篇关于PhoneGap和iPhone 6 Plus闪屏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆