title: Swift - toolbar follows tableview when scrolling
body: <p>In my UITableViewController, my toolbar follows my tableview when I scroll it. My code looks like this:</p>
  
  <pre><code> override func viewDidLoad() {
          let toolbar: UIToolbar = UIToolbar()
          let checkButton = [UIBarButtonItem(title: "Done", style: .Done, target: self, action: "checkedPress")]
          toolbar.frame = CGRectMake(0, self.view.frame.size.height - 46, self.view.frame.size.width, 48)
          toolbar.sizeToFit()
          toolbar.setItems(checkButton, animated: true)
          toolbar.backgroundColor = UIColor.redColor()
          self.view.addSubview(toolbar)
      }
  </code></pre>
  
  <p>and it looks like this when I run the app:
  <img src="https://i.stack.imgur.com/22qwW.png" alt="enter image description here"></p>
  
  <p>I want the toolbar to stick to the bottom of the view, how is this achieved?</p>
  
  <p>Any suggestions would be appreciated.</p>