I have UITableView being pushed to UINavigationController. I need to add a UIToolBar to that tableView. Toolbar has to have two butt开发者_开发技巧ons. After pressing each of them tableView will show different types of data, sections and cells.
UITableView has header view and i need it to stay whyle tableView itself changes.
What is the right way to implement this logics?
Your UIToolBar and your UITableView can be composed together inside the ViewController, the UIToolBar does not need to be a child view of your UITableView. If your ViewController is a subclass of UITableViewController you may need to switch to a simple UIViewController parent, so you can add both the tool bar and the table within the view.
That way the toolbar does not scroll with the table.
精彩评论