![](/img/trans.png)
[英]Incorrect frame size/orientation after switching from UINavigationController to a UISplitViewController
[英]UISplitViewController's detailView (UIWebView) size on orientation change?
我有一個UISplitViewController,有一個分配給它的detailView的UIWebView。 問題是,當我更改方向時,UIWebView的內容沒有調整大小。
我已將meta標簽添加到已加載的html中
<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'>
在常規的UIViewController中效果很好。 但是在UISplitViewController中,detailedView無效。 它是與不在拆分視圖控制器中時相同的UIViewController起作用的。
有誰知道任何解決方法或解決方案?
我通過設置此元標記來解決此問題:
<meta name='viewport' content='width=700'>
而且我認為這是有道理的,因為這是與UISplitViewController一起使用時detailView的最大寬度,而不是device-width
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.