简体   繁体   中英

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

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 that 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM