0
votes

I have UITableView being pushed to UINavigationController. I need to add a UIToolBar to that tableView. Toolbar has to have two buttons. 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?

1

1 Answers

1
votes

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.