0
我有麻烦了。我目前正在使用uiwebview来显示内容。但我想显示内容,而不需要在uiwebview中滚动。如何在Swift iOS(Xcode 6.0)中以编程方式更改UIWebView高度
下面的代码。看它
func webViewDidFinishLoad(webView: UIWebView!) {
var newBounds: CGRect = webView.bounds
newBounds.size.height = webView.scrollView.contentSize.height
webView.bounds = newBounds
}
但它不会改变它的大小。任何人都知道我该怎么办?
在此先感谢。
'webView.frame.size = webView.scrollView.contentSize' – Sujay
但我的webview内滚动视图。 – Viju
我已经为您的“无需在uiwebview中滚动显示内容”回答“ – Sujay