简体   繁体   中英

zoom a div tag in UIWebview

I have a webpage click here to see and it contains a div tag with the dimension 350 X 207. This is fixed size.

In my iphone screen I need to enlarge/zoom and display the div(in landscape). I tried the below two lines one at a time in my html file. //This line zooms the page but unable to customise the size.

Any help would be appreciated! Thanks.

Before doing this programmatically I'd try checking off the "Scales Pages to Fit" property in Interface Builder in the UIWebView Attributes inspector.

As mentioned here , you can also set the zoom scale:

 for (UIScrollView *scroll in [webView subviews]) {
    // Set the zoom level.
    [scroll setZoomScale:2.5f animated:YES];
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM