开发者

UITableView with UIToolBar

开发者 https://www.devze.com 2023-02-12 10:04 出处:网络
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

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.

0

精彩评论

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

关注公众号