We're writing an application that's in landscape mode exclusively. We use a transform on a root view to rotate it to LandscapeRight, then every view that gets loaded by that view shares the coordinate system. That's all fine and dandy, except one of our views has a UIWebView object that's being loaded by a view controller. The site that we're trying to look at doesn't have its content filling the view. When I view the same site in mobile Safari in landscape mode, it looks correct. My guess is that the View Controller we're using to host the WebView still thinks it's in portrait mode, as querying the interfaceOrientation of the property returns "1"...is there a way to trick a view/view controller to think it's in a specific orientation?
+7
A:
Hopefully you've already found an answer for this, but you might try telling your app to just start out in landscape mode, rather than forcing it to always rotate to that orientation. Then if your root view's shouldAutorotateToInterfaceOrientation returns yes only for landscape modes, I'd bet you'd have the behavior you're looking for.
This guy seems to have a good tutorial about how to do all that. http://www.dejoware.com/blogpages/files/iphone_programming_landscape_view_tutorial.html
Cruinh
2009-06-17 22:58:54
I wish this question wasn't abandoned so that you'd get your Answer flagged. This was exactly the answer I needed to get me past my problem, thank you Cruinh!
Zemm
2009-07-19 23:35:03