开发者

TabBar rotation from portrait to landscape

开发者 https://www.devze.com 2023-01-19 08:02 出处:网络
I am making a TabBar based universal app. I have added few extra tabsand changed the viewController to navigationController. N开发者_运维百科ow when i am trying to rotate the view from portrait to lan

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

0

精彩评论

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