UIWebView背景透明且无拖拽后的上下阴影
2014-02-08 00:29
197 查看
1.首先UIWebView背景透明
2.隐藏拖拽webview时上下的两个有阴影效果的subview
其他
a.UIWebView加载本地html
b.禁用UIWebView拖拽时的反弹效果
c.禁用UIWebView拖拽
// set background transparent, also can set it in nib file webView_.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; } } } }
其他
a.UIWebView加载本地html
// get html file path NSString *path = [[NSBundle mainBundle] pathForResource:@"about" ofType:@"html"]; [webView_ loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]]];
b.禁用UIWebView拖拽时的反弹效果
// disable view bounce [(UIScrollView *)[[webView_ subviews] objectAtIndex:0] setBounces:NO];
c.禁用UIWebView拖拽
// disable touch move <script type="text/javascript"> document.ontouchmove = function(e) { e.preventDefault(); } </script>
转自: http://blog.lanceli.com/2011/09/uiwebview-background-transparent.html[/code]
相关文章推荐
- UIWebView背景透明且无拖拽后的上下阴影
- IOS UIWebView去掉滚动条和黑色背景即拖拽后的上下阴影
- 实现网页往下拉动时的背景透明效果(UIWebView 去掉阴影)
- UIWebView背景透明的方法
- 怎么用IconWorkshop把ICO图标的阴影去掉? 弄成透明的背景呢?
- 怎样去掉桌面图标阴影(文字背景透明)
- iOS UIWebView 设置背景颜色透明
- CSS3.0特性—图像的背景 背景透明颜色 图像的透明 颜色的渐变 圆角 阴影
- 去掉UIWebView上下滚动出边界时的黑色阴影
- UIWebView背景透明
- 有效去掉桌面图标阴影,蓝色背景变成透明
- UIWebView背景透明的方法
- ios UIWebView 背景透明
- 让 UIWebView 背景透明的方法
- 关于按钮背景透明 + div拖拽
- 隐藏UIWebView滚动条和上下滚动时出边界的后面的黑色的背景
- PIE使用阴影后的背景透明方法
- QT_menu_设置背景透明和去阴影边框
- Android -- ListView控件 去上下滑动阴影 选中背景黄色
- UIWebView 背景透明