【发布时间】:2012-10-22 10:43:17
【问题描述】:
我遇到了关于 iphone 屏幕方向的问题。我的应用程序的基础 sdk 是 ios 6.0,部署目标是 4.3,并在 ios 5.0 和 5.1 上运行
在应用程序的 plist 文件中,我设置了 Portrait (bottom home button)、Landscape (left home button) 和 Landscape (right home button)。我正在开发一个通用应用程序。所以在每个视图的- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 方法中,我有条件地返回portrait for iphone 和landscape for ipad。
我的导航流程是:
UINavigatinController 推送 UITableViewControler 第一个标签有 UINavigationController 在 rootViewController 上一个一个推送 2 个视图。
在我最后一个 viewController 的 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 方法中,我返回了 YES。但是这个视图的应用程序根本没有被旋转。甚至没有调用- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 方法。 :(
我的要求是只支持一个视图控制器而不是整个应用程序的横向和纵向方向。
请帮帮我。
【问题讨论】:
标签: iphone ios uiinterfaceorientation