Reputation: 426
I have a UIToolbar that I added to a UITableViewController in my Storyboard.
When this view is displayed, the toolbar will show itself directly below the last item in my UITableView. I want to "Dock" my toolbar on the bottom of the screen. I want it to display in the same place every time rather than move around depending on a variable number of table cells in my view. I need the user to be able to see all the cells as well (It can't be covering UITableView items, UITableView needs to decrease its allotted display space). How can I do this?
Edit: Using a UINavigationController to handle my views
Upvotes: 5
Views: 5367
Reputation: 130193
You have a couple of options. The first and easiest of the two would be to use a UITableViewController
embedded inside a UINavigationController
, with the navigation controllers toolbarHidden
property set to NO
.
The other option is to use a UIViewController
. A view controller has a UIView
build in, and you can manually add and position a UITableView
and a UIToolbar
on it in this configuration. Both of these configurations will achieve your desired end result.
Upvotes: 11