开发者

Table view load subview?

开发者 https://www.devze.com 2023-03-17 09:55 出处:网络
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

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:

Table view load subview?

This is what it looks like:

Table view load subview?

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

Table view load subview?

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 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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号