2011-06-15 102 views
0

我想開在UIWebView的一個網址,我可以打開網址,但它撕心裂肺大似號:enter image description hereUIWebView中的ZoomIn和ZoomOut?

我想打開URL捕捉全貌,或者我們可以說URL中的所有內容將是可見的在一次和用戶可以捏(ZoomIn和ZoomOut像UIScrollView)的網頁。我怎樣才能實現這一點。謝謝。

我想要像這樣在WebView中顯示URL。 enter image description here

+0

它已經在uiwebview中實現..不是嗎? – cocos2dbeginner 2011-06-15 06:25:04

回答

1

Set scalesPageToFit property to YES

myWebView.scalesPageToFit = YES; 
+0

這對我沒有幫助。這是我的示例代碼。 NSString * urlAddress = @「http://www.google.com」; \t \t \t \t //創建一個URL對象。 \t NSURL * url = [NSURL URLWithString:urlAddress]; \t \t // URL請求對象 \t NSURLRequest * requestObj = [NSURLRequest requestWithURL:url]; \t \t \t \t //webviewBuyCD.scalesPageToFit = YES; \t //在UIWebView中加載請求。 \t [webviewBuyCD loadRequest:requestObj]; – user532445 2011-06-15 12:21:20