开发者

Change orientation in UITabBar

开发者 https://www.devze.com 2023-03-12 22:13 出处:网络
I have a UITabBar with a lot of view controllers and navigation controller. I am trying to support both orientations but only portrait works. I know that I have to override this method in all view con

I have a UITabBar with a lot of view controllers and navigation controller. I am trying to support both orientations but only portrait works. I know that I have to override this method in all view controllers and return YES and I did like this:

- (BOOL)shouldAutorotateToInterfaceOrien开发者_运维问答tation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}

but it still doesn't work. What could possibly be wrong?


Be sure:

  • Your info.plist supports all the orientations.
  • All the view controllers support it as well.
  • Your UITabBarController itselfs supports them.
0

精彩评论

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

关注公众号