FAQ Database Discussion Community

UITabBarViewController doesn't rotate - iOS

I have a UITabBarViewController that contains 5 tabs and a login view which is not part of my tab bar, in my settings I have set that I support all device orientations. but when I run my app, only my login view is the only which rotates. I have created...

Stop autorotation of UIViewController at creation time

Is there any way to set autorotate behavior of an UIViewController object when it's initiated? I wanted it to never rotate, so I tried this: UIViewController *myViewController = [[UIViewController alloc]init]; myViewController.shouldAutorotate = NO; Seemed logical, but it doesn't work. Get the error message: No setter method 'setShouldAutorotate:' for assignment to...