My tab bar based application won't rotate at all. I've done all the configuration needed without luck. All my controllers override the:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return YES;
}
and in the viewDidLoad
method i have set the properties:
self.view.autoresizesSubviews = YES;
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleWidth;
Now i noticed that the shouldAutorotate
method is called only once when the view is created the first time, i guess it should be like that. All of my controllers are subclassing UIViewController
I don't know what else to do. Some help will be开发者_开发问答 appreciated.
Thanks.
try this one
u have to use this all of ur Viewcontrollers in tabbarcontroller.
change this
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleWidth;
to
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.view.autoresizesSubviews = YES;
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
精彩评论