当UIWebview
用户在UISegmentedControl
. 出于某种原因,我无法让它允许pinch/zooming
。我在方法中设置了以下代码viewDidLoad:
,所以它应该可以工作。
self.myWebView = [[[UIWebView alloc] initWithFrame:self.view.frame] autorelease];
self.myWebView.backgroundColor = [UIColor whiteColor];
self.myWebView.scalesPageToFit = YES;
self.myWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
self.myWebView.delegate = self;
[self.view addSubview: myWebView];
我尝试从 NIB 加载UIWebView
并以编程方式创建它,但无济于事。有什么我想念的吗?什么可能导致 webview 忽略捏合和缩放?
谢谢!