旋转视图 iPhone 标签栏应用程序 [英] Rotate view iPhone tabbar app

查看:48
本文介绍了旋转视图 iPhone 标签栏应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个主窗口的应用程序,其中包含一个标签栏控制器和许多不同的视图.我希望整个东西能够在每个方向旋转,但是做

I have an app with a mainwindow which contains a tabbar controller and a number of different views. I want the whole thing to be able to rotate in each direction, however doing

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
}

没有帮助,但在其他应用中确实有效.

didn't help, while that did work in other apps.

推荐答案

UITabBarController 要求您在它管理的所有视图控制器上启用旋转.因此,对于您希望旋转到的方向,每个视图控制器都应该为该方法返回 YES.

The UITabBarController requires that you enable rotation on all view controllers it manages. So each view controller should return YES for that method for the orientations you wish to rotate to.

这篇关于旋转视图 iPhone 标签栏应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆