• <legend id='sAoJQ'><style id='sAoJQ'><dir id='sAoJQ'><q id='sAoJQ'></q></dir></style></legend>

  • <i id='sAoJQ'><tr id='sAoJQ'><dt id='sAoJQ'><q id='sAoJQ'><span id='sAoJQ'><b id='sAoJQ'><form id='sAoJQ'><ins id='sAoJQ'></ins><ul id='sAoJQ'></ul><sub id='sAoJQ'></sub></form><legend id='sAoJQ'></legend><bdo id='sAoJQ'><pre id='sAoJQ'><center id='sAoJQ'></center></pre></bdo></b><th id='sAoJQ'></th></span></q></dt></tr></i><div id='sAoJQ'><tfoot id='sAoJQ'></tfoot><dl id='sAoJQ'><fieldset id='sAoJQ'></fieldset></dl></div>
  • <tfoot id='sAoJQ'></tfoot>

          <bdo id='sAoJQ'></bdo><ul id='sAoJQ'></ul>

        <small id='sAoJQ'></small><noframes id='sAoJQ'>

        在 UIWebView 上显示背景图像

        Displaying a background image on UIWebView(在 UIWebView 上显示背景图像)
        <i id='NVywh'><tr id='NVywh'><dt id='NVywh'><q id='NVywh'><span id='NVywh'><b id='NVywh'><form id='NVywh'><ins id='NVywh'></ins><ul id='NVywh'></ul><sub id='NVywh'></sub></form><legend id='NVywh'></legend><bdo id='NVywh'><pre id='NVywh'><center id='NVywh'></center></pre></bdo></b><th id='NVywh'></th></span></q></dt></tr></i><div id='NVywh'><tfoot id='NVywh'></tfoot><dl id='NVywh'><fieldset id='NVywh'></fieldset></dl></div>

              <legend id='NVywh'><style id='NVywh'><dir id='NVywh'><q id='NVywh'></q></dir></style></legend>

              <small id='NVywh'></small><noframes id='NVywh'>

              • <bdo id='NVywh'></bdo><ul id='NVywh'></ul>
                  <tbody id='NVywh'></tbody>
              • <tfoot id='NVywh'></tfoot>
                  本文介绍了在 UIWebView 上显示背景图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试构建一个原生应用程序,该应用程序的所有意图和目的都是 HTML/CSS 和 Javascript.一切正常,但是当 UIWebView 加载时,在填充 DOM、检索图像等时会有延迟.

                  I'm trying to build a native application that for all intents and purposes is HTML/CSS and Javascript. It all works fine, but when the UIWebView loads there's a delay while the DOM is populated, images retrieved etc.

                  到底有没有在 UIWebView 上显示背景图像,或者它背后的东西?理想情况下,这将与初始屏幕相同,因此不会影响从斜线过渡到应用的体验.

                  Is there anyway to display a background image on the UIWebView, or something behind it? Ideally this will be the same as the splash screen so it doesn't affect the experience of transitioning from slash to app.

                  谢谢

                  罗比

                  推荐答案

                  我不相信你想将 UIWebView 设置为透明并在其后面显示图像.

                  I don't believe you want to be setting the UIWebView as transparent and showing an image behind it.

                  相反,在 UIWebView 加载其内容之前,您应该有某种视图(可能带有您建议的图片,可能带有 UIIndicator 和使页面变暗"的半透明视图).

                  Instead you should have some sort of view (maybe with a picture as you suggest, maybe with a UIIndicator and a semi-transparent view that "darkens" the page) that sits there until the UIWebView has loaded its content.

                  为此,首先你的类应该订阅 UIWebViewDelegate 协议:

                  To do this, first your class should subscribe to the UIWebViewDelegate protocol:

                  @interface myWebView : UIViewController <UIWebViewDelegate> {
                    // variables etc
                  }
                  

                  然后,您可以在加载时显示视图:

                  Then, you can show a view on load:

                  -(void)viewDidLoad {
                    myView.hidden = NO;
                  }
                  

                  最后,您可以覆盖 webViewDidFinishLoad 方法以在加载后将其隐藏

                  And finally, you can override the webViewDidFinishLoad method to hide it once it's loaded

                  - (void)webViewDidFinishLoad:(UIWebView *)localwebView {
                      myView.hidden = YES;
                  }
                  

                  这篇关于在 UIWebView 上显示背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                  [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
                • <small id='ats71'></small><noframes id='ats71'>

                    <tbody id='ats71'></tbody>

                          <bdo id='ats71'></bdo><ul id='ats71'></ul>
                          <tfoot id='ats71'></tfoot>
                          <legend id='ats71'><style id='ats71'><dir id='ats71'><q id='ats71'></q></dir></style></legend>
                          <i id='ats71'><tr id='ats71'><dt id='ats71'><q id='ats71'><span id='ats71'><b id='ats71'><form id='ats71'><ins id='ats71'></ins><ul id='ats71'></ul><sub id='ats71'></sub></form><legend id='ats71'></legend><bdo id='ats71'><pre id='ats71'><center id='ats71'></center></pre></bdo></b><th id='ats71'></th></span></q></dt></tr></i><div id='ats71'><tfoot id='ats71'></tfoot><dl id='ats71'><fieldset id='ats71'></fieldset></dl></div>