I am making a TabBar based universal app. I have added few extra tabs and changed the viewController to navigationController. N开发者_运维百科ow when i am trying to rotate the view from portrait to landscape, its rotating the inside view but tabBar does not rotate and it stays at the same place ie at the bottom of the portrait mode where as every other UI are rotating properly.
Make sure the controller not supporting the rotation (respectively its owner) overrides shouldAutorotateToInterfaceOrientation and returns YES for all orientations.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
#pragma unused(interfaceOrientation)
// Overriden to allow any orientation.
return YES;
}
http://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006926-CH3-SW23
精彩评论