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 ret开发者_如何学JAVAurn to the original view, and remove the bottom bar. How could I do that?
Here is structure:
This is what it looks like:
This is what is should look like after a table view cell is clicked:
Thanks for the help!
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)
Use an UINavigationController
that manages 2 UIViewController
s (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)
精彩评论