Orientation UIView / UIVIewController

We are writing an application that is exclusively in landscape mode. We use the transformation in the root view to rotate it to LandscapeRight, then each view that is loaded by this view shares a coordinate system. That everything is beautiful and dandy, except for one of our views, has a UIWebView object that is loaded by the view controller. The site we're trying to look at does not have content populating the view. When I look at the same site in mobile Safari in landscape mode, it looks right. I assume that the view controller that we use to host the WebView is still thinking about it in portrait mode, since the request for the interface's Property Orientation returns "1" ... is there any way to trick the view / view controller to think about it in specific orientation?

+6
iphone cocoa-touch
source share
1 answer

I hope you already found the answer for this, but you can ask the application to just start in landscape mode, and not force it to always turn to this orientation. Then, if your root view shouldAutorotateToInterfaceOrientation returns yes only for landscape modes, I would argue that you will have the behavior you are looking for.

This guy seems to have a good tutorial on how to do all this. http://www.dejoware.com/blogpages/files/iphone_programming_landscape_view_tutorial.html

+12
source share

All Articles