简体   繁体   English

Phonegap iPad App Splash / Launch Screen在deviceReady上移位

[英]Phonegap iPad App Splash / Launch Screen Shifts on deviceReady

I have an iPad Application (landscape orientation only) created with HTML/JS/CSS + Phonegap; 我有一个用HTML / JS / CSS + Phonegap创建的iPad应用程序(仅限横向); everything works as expected however I've run into a problem with the Splash / Launch Screen. 一切都按预期工作但是我遇到了Splash / Launch Screen的问题。

When the Application loads, the correct Splash / Launch Screen is shown (correct size and naming etc.), however once the application reaches deviceReady state and hides the Splash / Launch Screen, it shifts up about 20px and shows a white bar along the bottom right before it is hidden. 当应用程序加载时,会显示正确的启动/启动屏幕(正确的大小和命名等),但是一旦应用程序达到deviceReady状态并隐藏启动/启动屏幕,它会向上移动大约20px并在底部显示一个白条就在隐藏之前。

Does anyone know what is happening and / or how to fix it? 有谁知道发生了什么和/或如何解决它?

Thank you! 谢谢!

For anyone running into this same problem; 对于遇到同样问题的人; turns out that this is actually part of how Phonegap works. 事实证明,这实际上是Phonegap工作方式的一部分。 After the initial launch image is displayed and right before the deviceReady State kicks in, Phonegap shifts the UIWebView up 20px. 在显示初始启动图像并且在deviceReady State启动之前,Phonegap将UIWebView向上移动20px。 The workaround is to create the launch image at the full pixel size of the screen and disregard the warning in Xcode. 解决方法是以屏幕的完整像素大小创建启动图像,并忽略Xcode中的警告。

I've posted several apps to the iTunes store this way without any problems. 我已经通过这种方式向iTunes商店发布了几个应用程序而没有任何问题。

I hope this helps someone! 我希望这可以帮助别人!

this has been fixed with the version 1.7.0 here the commit: http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=73620e43 这已经通过版本1.7.0修复了这里的提交: http ://git-wip-us.apache.org/repos/asf?p = plasticator-cordova-ios.git; a = commit; h = 73620e43

i have just upgraded a project i have and it works. 我刚刚升级了一个项目,它有效。

I've had this problem too, and in my case the problem was caused by adhering to Apple's own specifications. 我也有这个问题,在我的情况下,这个问题是由于坚持Apple自己的规格造成的。

I'm pretty sure Apple specifies that the file ought to be 1004 by 768, so if you have been mindlessly working to their specifications, don't think that you will therefore not get any problems. 我很确定Apple指定文件应该是1004乘768,所以如果你盲目地按照他们的规格工作,不要以为你不会遇到任何问题。

If you build a PhoneGap app, you will have to dance to Phonegap's music. 如果你构建一个PhoneGap应用程序,你将不得不跳到Phonegap的音乐。 So Adam Robertson, have you truly double-checked that you have the right image size? Adam Robertson,您是否真的仔细检查过您是否拥有合适的图像尺寸?

If you have, here is another possible cause/solution: 如果有,这是另一个可能的原因/解决方案:

Try setting the "status bar initially hidden" option in the project's plist file (not phonegap.plist or cordova.plist but the one with your project's name) to True. 尝试将项目的plist文件(不是phonegap.plist或cordova.plist,而是带有项目名称的文件)中的“状态栏最初隐藏”选项设置为True。 This way, the 1024-sized image will fully get the light of day, and Phonegap won't feel it has to pump it around. 这样,1024大小的图像将完全获得白天的光,而Phonegap将不会觉得它必须将它抽出来。

If the image really is 1024x768 in size, this should prevent cordova from trying to manipulate the image. 如果图像的大小确实是1024x768,这可能会阻止cordova尝试操作图像。 If there are still issues, try setting different values for 'status bar style' in the same plist file. 如果仍有问题,请尝试在同一个plist文件中为“状态栏样式”设置不同的值。 Some are transparent, others opaque: maybe they have an effect as well. 有些是透明的,有些是不透明的:也许它们也有效果。

Our image is 1024x768 and we are still seeing the pixel shift. 我们的图像是1024x768,我们仍然看到像素移位。 Is 1024x768 not the full pixel size of the screen? 1024x768不是屏幕的全像素大小吗? I check Apple's hardware spec and it said that it was. 我检查了Apple的硬件规格,它说是的。 Have you tried anything else that worked? 你有没有尝试过其他有用的东西?

Thanks Adam 谢谢亚当

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM