WebView在方向更改上无法正常工作 [英] WebView not working correctly on orientation change

查看:68
本文介绍了WebView在方向更改上无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有webView的通用应用程序,该应用程序在发生方向变化时会调整大小. 在iPad模拟器上,webView会自动重排以适应新的宽度. 但是在iPhone模拟器上,内容不会重排,其中一些内容会被切断.

I have a Universal app with a webView which resize when an orientation change occurs. On the iPad simulator, the webView automatically reflows to fit the new width. But on the iPhone simulator, the content doesn't reflow and some of it gets cut off.

这是已知的WebView错误吗?如何解决此问题?

Is this a known WebView Bug ? How do I fix this issue?

我的Web视图仅加载一个远程html页面.

My webview just loads a remote html page.

我正在IOS 4.3上进行测试

I am testing on IOS 4.3

推荐答案

在界面构建器中,您必须调整WebView的属性以使其在方向更改时伸展.确保您做到了.在Xcode中看起来像这样:

In the interface builder, you have to adjust the properties of the WebView to make it stretch on orientation change. Make sure you did that. It looks like this in Xcode:

这篇关于WebView在方向更改上无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆