webview改变网页宽度

时间:2014-08-12 16:16:44   收藏:0   阅读:210
- (void)webViewDidFinishLoad:(UIWebView *)webView  
{     
    //修改服务器页面的meta的值  
    NSString *meta = [NSString stringWithFormat:@"document.getElementsByName(\"viewport\")[0].content = \"width=%f, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"", webView.frame.size.width];  
    [webView stringByEvaluatingJavaScriptFromString:meta];  
} 

 

webview改变网页宽度,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!