Andrew
Andrew

Reputation: 3999

Table view load subview?

When a user clicks on a Table View Cell, I would like to push a UIView into the place of the Table View, swap out the current top bar items to just have a "back" button to return to the original view, and remove the bottom bar. How could I do that?

Here is structure:

enter image description here

This is what it looks like:

enter image description here

This is what is should look like after a table view cell is clicked:

enter image description here

Thanks for the help!

Upvotes: 0

Views: 213

Answers (2)

Rad'Val
Rad'Val

Reputation: 9231

Use an UINavigationController that manages 2 UIViewControllers (one for each of the views you described above). Then to push and pop (go back and forward in the navigation) use

self.navigationController pushViewController:(UIViewController *) animated:(BOOL)

and

self.navigationController popViewControllerAnimated:(BOOL)

Upvotes: 0

filipe
filipe

Reputation: 3380

It seems you want the exact behaviour of a UINavigationController. Take a look at the docs: UINavigationController Reference, View Controller Programming Guide for iOS (Navigation Controllers)

Upvotes: 3

Related Questions