0
votes

In an iPad app, I have a tableView as a subview of a top level viewController - let's call it topVC. The tableView is controlled by a dedicated viewController, tblVC, which is a property of topVC. I need the tableView to support iPhone-style detailView navigation.

Setting up a UINavigationController property in the topVC.xib in IB, with tblVC wired as the rootViewController, didn't work, so I set it up the UINavigationController programmatically in topVC viewWillAppear: initializing it with tblVC as the rootViewController, and setting its view as a subview of topVC. This functioned as desired but upon rotation to landscape orientation, the navigationController's navigationBar would pop to the top of thetopVC view.

Is it possible to manually achieve detailView navigation with basic iPhone-style slide-in animation without UINavigationController, using UINavigationBar and UINavigationItem? I thought of setting the detailView out of the frame of the tableView and sliding it in manually, but that only made it appear over another subview and slide into the tableView. How to do this?

1

1 Answers

0
votes

You could consider using a popover view controller, and host inside it a standard UINavigationController, with your UITableViewController inside that.

Otherwise you're gonna have to roll your own nav-controller. I've found that it's a real PITA to change/affect some of the innate behaviors you're seeing, like repositioning on rotation.