How to add a toolbar to the bottom of a UITableViewController in Storyboards?

前端 未结 6 1951
温柔的废话
温柔的废话 2020-12-04 14:21

In my UITableView that I have setup using Storyboards, I need to be able to add a tool bar that sticks to the bottom of the view, it should not scroll.

6条回答
  •  旧时难觅i
    2020-12-04 15:08

    I used an intermediate View Controller with a Container view to the table. Add the toolbar view to the intermediate, and make it look however you want (use UIButtons instead of UIBarButtonItem).

    If you do this, have the container view stretch to the top of the screen and not the bottom of the nav bar or you'll pull your hair out trying to get the scroll insets right.

    Some more details in a similar question https://stackoverflow.com/a/31878998/1042111

提交回复
热议问题