开发者

tabbar based application won't rotate at all

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜