开发者

Orientation of a UIWebView HTML5 video

开发者 https://www.devze.com 2023-01-06 23:53 出处:网络
I am using a UIWebView in a Tab Bar application and I am havi开发者_JS百科ng a <video> tag for some m4v clips. I have the desired behavior so far, however when the device goes from portrait to l

I am using a UIWebView in a Tab Bar application and I am havi开发者_JS百科ng a <video> tag for some m4v clips. I have the desired behavior so far, however when the device goes from portrait to landscape, the video (and the controllers) remain as before. I am not 100% sure, but I suspect that the UITabBarController is "locking" the orientation change (as the same page in mobile Safari does autorotate). Can that be the case? If yes, is there a workaround? It is important to show all other content (of this and the other tabs) in portrait but the video in landscape.


UITabBarController doesn't autorotate by default, you need to subclass it and override shouldAutorotateToInterfaceOrientation:.

0

精彩评论

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