Limiting landscape views in UITabBarController containing UINavigationController

Posted by Spider-Paddy on Stack Overflow See other posts from Stack Overflow or by Spider-Paddy
Published on 2010-05-06T07:15:18Z Indexed on 2010/05/06 7:18 UTC
Read the original article Hit count: 500

I have a tab bar application that contains navigation views in 2 of its tabs. I would like 1 view in the 1 navigation controller to allow landscape view but because of the nav bar in tab bar limitation I now have to allow landscape views for every single view in my app to make the tilt messages get passed to my app which I don't want.

I thought perhaps, on the views which shouldn't go to landscape, that there might be ways to either: prevent the view change e.g. calling setOrientation:UIDeviceOrientationPortrait whenever the device goes landscape or giving the illusion that the view doesn't change e.g. presenting a modal portrait view over the rotated view

Anybody have any ideas or experience that they care to share? What is the best approach here? (I don't want to now have to design a landscape view for every view just to so that I can display a portrait & landscape view for 1 view)

© Stack Overflow or respective owner

Related posts about uinavigationcontroller

Related posts about uitabbarcontroller