开发者

pinchable webview

开发者 https://www.devze.com 2023-03-08 10:37 出处:网络
I have a webview, which show a link to a specific website, but the display is fixed, it feels like browsing the web from old style mobile, n not iphone.

I have a webview, which show a link to a specific website, but the display is fixed, it feels like browsing the web from old style mobile, n not iphone. Is there a way to make a webview pinchable? Since the webview in my apps is not 开发者_如何学JAVApinchable, which mean I can't zoom it in or out. Any help is appreciated. Thanx in advance.


You need to make sure that scale pages to fit is checked in IB, and that multi-touch & user interaction are enabled.


That worked for me:

UIWebView *webView = [[UIWebView alloc] initWithFrame:self.bounds.frame];
webView.scalesPageToFit=TRUE;
0

精彩评论

暂无评论...
验证码 换一张
取 消