当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - Orientation of a UIWebView HTML5 video

问题描述:

I am using a UIWebView in a Tab Bar application and I am having 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:.

分享给朋友:
您可能感兴趣的文章:
随机阅读: