- (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]; }