ios - 在 UISplitViewController 中弹出 UINavigationController 会导致奇怪的转换

标签 ios ipad uinavigationcontroller uisplitviewcontroller

我在 UISplitViewController 的主视图中使用 UINavigationController。在我的 UINavigationController 中,我像往常一样有一个 UITableViewController。选择此 TableView 中的单元格会将新的 UINavigationItem 插入堆栈。这种转变如我所料发生。但是,一旦我按下,当我按下“后退”按钮时,返回顶部 UINavigationItem 的转换不会像往常一样从左向右滑动。相反,屏幕变黑,持有 UINavigationController/UITableViewController 的 Master View 从顶部向下滑动到屏幕中央,然后 UINavigationController 又出现在左侧我期望的一面。我发现了类似的问题,但所有接受的答案都围绕着没有正确处理轮换。我仔细检查了我的所有 View Controller 是否针对所有方向返回 YES

最佳答案

在我的 View Controller 中实现以下内容为我解决了这个问题

-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}

希望对你也有用

关于ios - 在 UISplitViewController 中弹出 UINavigationController 会导致奇怪的转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9962329/

相关文章:

iphone - 从 UISplitViewController 中删除分隔线

ios - 如何更改后退按钮的功能以显示列表?

ios - 在哪里可以下载 OS X 10.10 SDK 以在 Xcode 6.3 中运行 Mac 应用程序?

ios - 多区域拉伸(stretch)图像

iphone - 如何使用 CSS 重新设置嵌入式播放器的高度和宽度?

ios - 添加到导航堆栈的多个调用

iphone - UIView 更改内部导航 View

ios - NSLayoutConstraint 没有成员 'Attribute'

ios - 升级到 Xcode8 后 React Native RCCTCustomScrollView 损坏

iphone - NSUbiquitousKeyValueStore错误仅在升级应用程序时出现。全新安装的应用程序工作正常。 iCloud的