【发布时间】:2010-11-13 05:37:30
【问题描述】:
在 iPad 应用程序中,我有一个 tableView 作为顶级 viewController 的子视图 - 我们称之为 topVC。 tableView 由一个专用的 viewController 控制,tblVC,它是topVC 的一个属性。我需要 tableView 来支持 iPhone 风格的 detailView 导航。
在 IB 的 topVC.xib 中设置 UINavigationController 属性,将 tblVC 连接为 rootViewController,但不起作用,所以我在 topVC viewWillAppear: 中以编程方式设置了 UINavigationController 初始化它tblVC 作为 rootViewController,并将其视图设置为 topVC 的子视图。这可以正常工作,但在旋转到横向时,navigationController 的 navigationBar 会弹出到topVC 视图的顶部。
是否可以在没有UINavigationController、使用UINavigationBar 和UINavigationItem 的情况下手动实现detailView 导航和基本的iPhone 式滑入动画?我想过将detailView设置在tableView的框架之外并手动将其滑入,但这只会使其出现在另一个子视图上并滑入tableView。如何做到这一点?
【问题讨论】:
标签: ios uitableview uinavigationcontroller