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

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

        • <bdo id='dRFL2'></bdo><ul id='dRFL2'></ul>

        无法在 iOS 中更改 UIWebView 的背景

        Can#39;t change background for UIWebView in iOS(无法在 iOS 中更改 UIWebView 的背景)

            1. <tfoot id='SyiYY'></tfoot>
                <tbody id='SyiYY'></tbody>

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

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

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

                • <legend id='SyiYY'><style id='SyiYY'><dir id='SyiYY'><q id='SyiYY'></q></dir></style></legend>
                  本文介绍了无法在 iOS 中更改 UIWebView 的背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法改变 UIWebView 的背景颜色?

                  Is there a way to change background color for UIWebView?

                  IB 中设置的所有颜色均未影响 UIWebView 行为:在加载实际内容之前,它显示为白色(在加载和呈现内容之间导致白色闪烁).

                  None of the colors set in IB effect UIWebView behavior: before actual content is loaded it shows as up as white (causing a white flash between the moment it is loaded and content is rendered).

                  以编程方式设置背景颜色也不做任何事情.

                  Setting background color programmatically does not do anything either.

                  代码如下:

                  @interface Web_ViewViewController : UIViewController {
                  
                      UIWebView *web;
                  }
                  
                  @property (nonatomic, retain) IBOutlet UIWebView *web;
                  @end
                  
                  ....
                  -(void)viewDidLoad {
                      super viewDidLoad;
                  
                      web.backgroundColor = [UIColor blueColor];
                      NSURL *clUrl = [NSURL URLWithString:@"http://www.apple.com"];
                      NSURLRequest *req = [NSURLRequest requestWithURL:clUrl];
                  
                      [web loadRequest:req];
                  }
                  

                  推荐答案

                  可以将webview的opaque属性设置为NO,然后设置下view的背景色.

                  You can set the opaque property of the webview to NO and then set background color of the view beneath.

                  [webView setOpaque:NO];
                  

                  这篇关于无法在 iOS 中更改 UIWebView 的背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                  How to get indexPath.row of tableView which is currently being displayed?(如何获取当前正在显示的 tableView 的 indexPath.row?)
                  Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)
                  <i id='qoCBN'><tr id='qoCBN'><dt id='qoCBN'><q id='qoCBN'><span id='qoCBN'><b id='qoCBN'><form id='qoCBN'><ins id='qoCBN'></ins><ul id='qoCBN'></ul><sub id='qoCBN'></sub></form><legend id='qoCBN'></legend><bdo id='qoCBN'><pre id='qoCBN'><center id='qoCBN'></center></pre></bdo></b><th id='qoCBN'></th></span></q></dt></tr></i><div id='qoCBN'><tfoot id='qoCBN'></tfoot><dl id='qoCBN'><fieldset id='qoCBN'></fieldset></dl></div>
                • <small id='qoCBN'></small><noframes id='qoCBN'>

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

                      <legend id='qoCBN'><style id='qoCBN'><dir id='qoCBN'><q id='qoCBN'></q></dir></style></legend>
                    • <tfoot id='qoCBN'></tfoot>

                              <tbody id='qoCBN'></tbody>