views:

1654

answers:

2

Hello,

I have an application requirement of displaying custom ads in it so I decided to use UIWebView and load specific url with 468x60 ads generated in it. It works like charm, except one thing: loaded ad is too big (naturally) for 320px iPhone screen and I am unable to force it to shrink a litle bit.

What could I possibly do about it? Maybe there are some Javascript/CSS/HTML stuff I could do in ad page?

+1  A: 

UIWebView has a property called scalesPageToFit, or you could clip the image to the required dimensions, or resize the property to the correct size before downloading and displaying.

Jordan
+3  A: 

Checkout the "viewport" meta-tag. It'll let you tell the phone what the width of the page is and you can also set the initial zoom level.

http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/UsingtheViewport/UsingtheViewport.html

Dad