爱悠闲 > 热门搜索 >

uiwebview 劫持

uiwebview设置不能被拖动
UIWebView *webView=[[UIWebView alloc] init];  [(UIScrollView *)[[contentView subviews] objectAtIndex:0] setBounces:NO]; UIWebView的视图中的第一个,是和UIWebView同样大小的UIScrollView。因此将UIScrollView禁止拖动就可以了 
关于UIWebView和PhoneGap的总结
关于UIWebView和PhoneGap的总结 这个挺全
清除UIWebView的缓存
    //清除UIWebView的缓存     [ [NSURLCache  sharedURLCache ]removeAllCachedResponses];
清除UIWebView的缓存
    //清除UIWebView的缓存     [ [NSURLCache  sharedURLCache ]removeAllCachedResponses];
IOS_禁用UIWebView的ActionSheet
- (void)webViewDidFinishLoad:(UIWebView *)webView { [webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none';"]; } Customize the contextual menu of UIWebView
UIWebView使用方式
UIWebView解释的比较好的博客: http://sishuok.com/forum/blogPost/list/6166.html
UIWebView设置高度
UIWebVIew 实现了UIScollView的委托协议,所以UIWebView和UIScollView一样,是可以拖动的。但是,如果UIWebView是嵌套在UIScrollView里的,那我们是不希望UIWebView可以滑动。这时候就要获取UIWebView加载后的实际高度。代码如下: -(void)webViewDidFinishLoad:(UIWebView *)webView{     CGFloat webViewHeight=[webView.scrollView contentSize].height;     CGRect newFrame = webView.frame;     newFrame.size.height = webViewHeight;     webView.frame = newFrame; }
UIWebView设置高度
http://blog.csdn.net/yesjava/article/details/8214957 http://www.aiuxian.com/article/p-1551004.html UIWebVIew 实现了UIScollView的委托协议,所以UIWebView和UIScollView一样,是可以拖动的。但是,如果UIWebView是嵌套在UIScrollView里的,那我们是不希望UIWebView可以滑动。这时候就要获取UIWebView加载后的实际高度。代码如下
盗链
盗链 讲的挺清楚的 反盗链: Anti-Leech 反盗链技术: Anti Leech File Gate 工具推荐:盗链工具(网络嗅探)SRSniffer iOS  webview相关的: UIWebView capturing the response headers Grabbing POST data from UIWebView Do UIWebView and NSURLConnection share cookie storage? Where are an UIWebView
ios UIWebView 区分加载和点击连接
UIWebView的Delegate方法中有 - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType; 其中navigationType可以判断出来该事件是UIWebView的loadRequest 还是touch URL连接 typedef enum
彩票案例-UIWebView学习
UIWebView学习 UIWebView *webView = (UIWebView *)self.view; /** * 加载网页 */ //1、创建URL NSURL *url = [[NSBundle mainBundle] URLForResource:@"bjdc_howto.html" withExtension:nil]; //2、创建请求 NSURLRequest *request = [NSURLRequest requestWithURL:url]; //3、发送请求加载网页 [webView loadRequest:request];
UIWebView 自适应内容大小
#pragma mark - UIWebView Delegate Methods -(void)webViewDidFinishLoad:(UIWebView *)webView { CGFloat height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"] floatValue]; CGRect frame = webView.frame; frame.size.height = height; [webView setFrame:frame]; }
[IPhone] UIWebView的字体控制
这个代码示范了怎么统一修改UIWebView的的字体大小   - (void)webViewDidFinishLoad:(UIWebView *)webView { // finished loading, hide the activity indicator in the status bar [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [self.guideWebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '150%'"]; }
应用内部打电话方法
UIWebView*callWebview =[[UIWebView alloc] init];         NSURL *telURL =[NSURL URLWithString:@"tel:10010"];         [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];         //记得添加到view上         [self.view addSubview:callWebview];
需求是第一次进入加载页面,而后点击超链接不产生页面跳转
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {          if (_isFirstLoad) {         return NO;     }else     {         return YES;     } } - (void)webViewDidFinishLoad:(UIWebView *)webView {          _isFirstLoad = YES;     [self dimissHud]; }
iOS UIWebView 内存泄露
昨天内存泄露调很晚。 早上过来搜了一下,发现还是不大管用 Clearing UIWebview cache Code – UIWebView Memory Leak Prevention
获取UIWebView的内容高度
#pragma mark - UIWebview delegete - (void)webViewDidFinishLoad:(UIWebView *)webView { CGFloat height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"] floatValue]; CGRect frame = webView.frame; webView.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, height); }
[转] 为UIWebView实现离线浏览
http://www.keakon.net/2011/08/14/为UIWebView实现离线浏览 链接地址
IOS中webview捕捉js中的alert 并修改标题和按钮
@interface UIWebView (JavaScriptAlert) - (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; @end @implementation UIWebView (JavaScriptAlert) - (void)webView:(UIWebView
IOS中UIWebView和JavaScript交互
本文主要介绍IOS中UIWebview与JS之间的交互过程。 博客地址:链接地址