简体   繁体   English

Apple启动映像可在webapp中工作,但不能在UIWebView中工作-iPhone 4

[英]Apple startup image work in webapp but not in UIWebView - iPhone 4

I've implemented a webapp for iPhone 4 , which correctly loads "apple-touch-startup-image". 我已经为iPhone 4实现了一个webapp,可以正确加载“ apple-touch-startup-image”。

I followed the Apple documentation : 320 x 460 pixels and in portrait orientation, which works well when I open it as a webapp (from Mobile Safari). 我遵循了Apple文档:纵向为320 x 460像素,当我将其作为webapp(从Mobile Safari)打开时效果很好。 However when I try to open my webapp link from a very simple UIWebView inside a native app , it does'nt show the apple-touch-startup-image. 但是,当我尝试从本机应用程序中的非常简单的UIWebView打开我的webapp链接时,它没有显示apple-touch-startup-image。

Is there any way to perform that, for the purpose of showing a loading screen? 有什么方法可以执行此操作,以显示加载屏幕?

But when I try to open my webapp link from a very simple UIWebView from Xcode app ,it does'nt show the apple-touch-startup-image". 但是,当我尝试从Xcode应用程序中的一个非常简单的UIWebView打开我的Web应用程序链接时,它没有显示apple-touch-startup-image”。

The apple-touch-startup-image is only displayed when the page is loaded as a standalone web app. 仅当页面作为独立的Web应用程序加载时,才显示apple-touch-startup-image You'll note it doesn't appear when the page is browsed to in Safari, which is functionally the same mechanism that's being employed by the UIWebView. 您会注意到,在Safari中浏览页面时,它不会出现,这在功能上与UIWebView所采用的机制相同。

Your best bet is to display the Default.png image over the top of the UIWebView. 最好的选择是在UIWebView的顶部显示Default.png图像。 You can check that the UIWebView has loaded and hide the overlaid image once it has. 您可以检查UIWebView是否已加载,并在覆盖后将其隐藏。

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

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