English 中文(简体)
如何使UIWebview透明?
原标题:How to make UIWebview Transparent.?

我有一个带有 UIWebView 的 XIB, 带有 Alpha = 1. 0 的 UIWebView, 背景设置未设置为清除颜色和不透明。 在此 XIB 上, 我设置了一个图像作为此代码的背景 :

UIWebView 显示一个静态 html :

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

任何解决方案?

最佳回答

试试这个...

webViewFirstTab.opaque=NO;

for (UIView* subView in [webViewFirstTab subviews])
{
    if ([subView isKindOfClass:[UIScrollView class]]) {
        for (UIView* shadowView in [subView subviews])
        {
            if ([shadowView isKindOfClass:[UIImageView class]]) {
                [shadowView setHidden:YES];
            }
        }
    }
}
问题回答

iOS6 或 iOS7. 用户界面WebView 持有一个 UIWebViewScrollView, 持有 UIWbBBBBB浏览器View。 设置所有 3 个视图的后轮颜色以清除颜色不会产生透明背景 。 用户界面WebView还持有这样的 html :

有人能用这个来操作iOS6或7吗?





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签