currently working on an app at work that uses a tab bar controller. The app will not rotate to landscape mode at all – all views inherit from a baseVieController, and in here I have implemented:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return true;
}
Now I know a tabBar controller will not rotate unless all its subviews support the orientation the view is trying to rotate to – my question is this: If I do not implement the – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in all subviews, will it lock these subviews to portrait mode, even if I do not specify this as a desired orientation? Therefore locking the whole tabBar controller to portrait. I know similar questions have been asked before, but I couldn’t find the answer to this specific question. Thanks in advance.
You can rotate the view, just needs to over ride like below:
Just add the code in the view controller class where you want rotation on (here it is for “SampleClassName”)