开发者

UISplitViewController's detailView (UIWebView) size on orientation change?

开发者 https://www.devze.com 2023-01-30 06:44 出处:网络
I have a UISplitViewController which has a UIWebView assigned to its detailedView. The problem is that the UIWebView\'s content it is not resizing when I change the orientation.

I have a UISplitViewController which has a UIWebView assigned to its detailedView. The problem is that the UIWebView's content it is not resizing when I change the orientation.

I have added the meta tag to the loaded html

<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'>

and in a regular UIViewController works well. However in the UISplitViewController's detailedView has no effect. And it is the same UIViewController t开发者_高级运维hat works when not in the split view controller.

Does anyone know any workaround or fix for this?


I fixed it by setting this meta tag instead:

<meta name='viewport' content='width=700'>

and I think It makes sense because this is the max width of the detailedView when used with UISplitViewController and not device-width

0

精彩评论

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