views:

89

answers:

1

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.

A: 

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

Can Berk Güder
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
I don't know if my answer can be any clearer.
Can Berk Güder
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