开发者

Trouble with UIWebView: Unwanted Horizontal Scroll Bars

开发者 https://www.devze.com 2023-02-27 04:12 出处:网络
I\'m loading some simple local HTML that is all text, nothing fancy, into a UIWebView. Before iOS 4.1 it displays fine without my doing anything. From 4.2 on, the same HTML fills a window that is larg

I'm loading some simple local HTML that is all text, nothing fancy, into a UIWebView. Before iOS 4.1 it displays fine without my doing anything. From 4.2 on, the same HTML fills a window that is larger than the screen (portrait layout) and so the horizontal bar appear and scrolling is required to see the whole page.

Has anyone else had this problem and if so what did you do to fix it?

I've done everything I can think of which includes: - setting the body dimension in the css. - using the viewport meta tag to set the content to device-width (this just shrunk the size of the text but the window stayed the same size (i.e. too big). - setting the frame and/or bounds of the webview. - setting s开发者_如何学Ccale to fit on the webview.

Nothing has worked. The web view display area is still about twice as wide as the screen.

Baffled!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号