【发布时间】:2011-04-23 20:08:37
【问题描述】:
我有一个带有 4 个选项卡的 UITabViewController 应用程序,每个选项卡都有一个 UINavigationController,每个选项卡都有一个 UItableView。单击一行时,它会导航到另一个视图。 我只想为某个 UIViewController 支持横向定向,而不是在任何其他视图中。 当我在每个 UINavigationcontrollers (BOOL)shouldAutorotateToInterfaceOrientation: 方法上设置“返回 YES”时,即使在 uitableview 中,应用程序也会在所有视图中定向。 我怎样才能做到这一点?我很困惑
【问题讨论】:
-
你是在导航控制器还是表格视图控制器中定义 shouldAutorotateToInterfaceOrientation 方法?
-
我在导航控制器中定义了 shouldAutorotateInterfaceOrientation 方法
标签: iphone cocoa-touch xcode orientation