views:

428

answers:

2

Hello,

I am looking to display multiple web content in one main view.

I have created different WebView and make it's height and width to fit all in one view size of Landscape mode.

How to scale down web view content to show data in small size (as per WebView height and width) ?

I have built application using Interface builder.The view is interface with one tab bar of tab bar controller.

Thanks,

A: 

In principle you could use a scaling transform for any view and shrink it. However, a UIWebview is embedded in a fullscreen scrollview which I don't think will behave properly as a subview of another view (especially another subview.)

All the miniaturized web views I have seen have just been scaled images of the page. To make such an image you would draw the web view's CGLayer to a CGImage and then scale that image. It's the same process you would use to make thumbnails.

See Trevor Theodore's UIImage Categories for the necessary tools.

TechZen
A: 

You can use scalesPageToFit property of the web view to make sure the webpage scales to fit the view.

If your web view is called webView, you can do the below:

webView.scalesPageToFit = YES;  
Iggy
Hi lggy, I have checked by making ScalesPageToFit attribute enable in WebView Attributes but it didn't work.There may be it combination with Mode parameter to do.Does it work in your case by enabling only ScalesPageToFit ?Thanks,
TechFusion