UIWebView背景透明的方法

1.首先UIWebView背景透明

// set background transparent, also can set it in nib filewebView_.backgroundColor = [UIColor clearColor]; webView_.opaque = NO;

2.隐藏拖拽webview时上下的两个有阴影效果的subview

// remove shadow view when drag web view  for (UIView *subView in [webView_ subviews]) {    if ([subView isKindOfClass:[UIScrollView class]]) {      for (UIView *shadowView in [subView subviews]) {         if ([shadowView isKindOfClass:[UIImageView class]]) {              shadowView.hidden = YES;         }      }     }  }

评论

h
hw_7864

⭐️ Admin快速开发: https://show.cool-admin.com/

赞 0
h
hw_7864

⭐️ 官方文档: https://cool-js.com

赞 0
h
hw_7864

⭐️ chatgpt在线体验: https://cool-js.com/ai/chat-vip/index.html?r=helloworld

赞 0