【发布时间】:2010-08-02 15:39:53
【问题描述】:
我在网络视图中加载了一个 HTML 页面。但是在双击网络视图时,它不会缩放。我也将“scalesPageToFit”属性设置为“YES”,但我无法在 web 视图中看到缩放效果。
CGRect webFrame = CGRectMake(0, 0, 320, 480);
webView = [[UIWebView alloc] initWithFrame:webFrame];
webView.backgroundColor = [UIColor clearColor];
webView.scalesPageToFit = YES;
webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
webView.delegate = self;
webView.multipleTouchEnabled = YES;
[self.view addSubview:webView];
[self loadWebView];
【问题讨论】: