如何让 UIWebView 能通过“捏合”手势进行缩放?

2025-05-17 10:04:35
推荐回答(1个)
回答(1):

使用如下代码:

webview=[[UIWebView alloc]init];

webview.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);

webview.scalesPageToFit=YES;

webview.multipleTouchEnabled=YES;

webview.userInteractionEnabled=YES;