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

    <small id='6TcAH'></small><noframes id='6TcAH'>

          <bdo id='6TcAH'></bdo><ul id='6TcAH'></ul>

        UIWebView背景设置为Clear Color,但不透明

        UIWebView background is set to Clear Color, but it is not transparent(UIWebView背景设置为Clear Color,但不透明)

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

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

              • <tfoot id='bXcRr'></tfoot>

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

                    <tbody id='bXcRr'></tbody>

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

                  本文介绍了UIWebView背景设置为Clear Color,但不透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 iOS SDK 最新版本和 XCode 4.2 开发一个 iOS 4 应用程序.

                  I'm developing an iOS 4 application using iOS SDK latest version and XCode 4.2.

                  我有一个带有 UIWebView 的 XIB,其中 Alpha = 1.0Background 设置为 Clear Color 并且 <未设置strong>不透明.在这个 XIB 上,我使用以下代码将图像设置为背景:

                  I have a XIB with a UIWebView with Alpha = 1.0, Background set to Clear Color and Opaque is not set. On this XIB I setup an image as background with this code:

                  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
                  {
                      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
                      if (self) {
                          UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"AboutBackground.png"]];
                          self.view.backgroundColor = background;
                          [background release];
                      }
                      return self;
                  }
                  

                  UIWebView 显示的是静态 html:

                  The UIWebView is showing an static html:

                  <html><head></head><body style="margin:0 auto;text-align:center;background-color: transparent; color:white">...</body></html>
                  

                  在 iOS 5 模拟器上,它的背景是透明的,但在 iOS 4 设备上是灰色的.

                  On iOS 5 simulator, its background is transparent, but on an iOS 4 device is grey.

                  有什么线索吗?

                  推荐答案

                  另外设置:

                  [webView setBackgroundColor:[UIColor clearColor]];
                  [webView setOpaque:NO];
                  

                  这篇关于UIWebView背景设置为Clear Color,但不透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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)
                  <legend id='x92MV'><style id='x92MV'><dir id='x92MV'><q id='x92MV'></q></dir></style></legend>
                    <tbody id='x92MV'></tbody>

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

                    <tfoot id='x92MV'></tfoot>

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