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.
views:
89answers:
1
A:
UITabBarController
doesn't autorotate by default, you need to subclass it and override shouldAutorotateToInterfaceOrientation:
.
Can Berk Güder
2010-07-12 10:08:57
So you think that this is what actually causes the problem, right? Can you explain a bit better what to do after subclassing UITabBarController?
Irene
2010-07-12 10:41:58
I don't know if my answer can be any clearer.
Can Berk Güder
2010-07-12 10:51:31
That's strange, this works (with or without subclassing UITabBarController) as desired in 3.1.3, but not in iOS4. I also tried to change webView.allowsInlineMediaPlayback but with no luck.. Can you think of something in iOS4 that prevents the video from autorotating in landscape?
Irene
2010-09-14 11:58:10