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.
This remedy works for (2016) iOS 9.2. We all hate how Apple makes us waste time in stuff that should be straightforward like this. I like step by step solutions for this type of silly problems, so I will share it with you!:
In the viewDidLoad() method of your View controller, add this code before anything else:
override func viewDidLoad(animated: Bool) {
self.navigationController?.setToolbarHidden(false, animated: true)
//the rest of code }
You don't want that toolbar hanging around elsewhere, so add this inside your view to hide it once the current window is dismissed:
-
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated);
self.navigationController?.setToolbarHidden(true, animated: animated)
}
Voila!