title: App crashing when setting UITabBarDelegate to UIViewController
body: <p>Having an issue with my app crashing when I try and set the UITabBarDelegate to self in subclass of <code>UIViewController</code>. I have a <code>UITabBarViewController</code> with several TabItems linked to View Controllers. One of those View Controllers is <code>HomeViewController</code>. I have the following code in <code>HomeViewController</code>:</p>
  
  <pre><code>class HomeViewController: UIViewController, UITabBarDelegate {
          override func viewDidLoad() {
          super.viewDidLoad()
          self.tabBarController?.tabBar.translucent = false
          self.extendedLayoutIncludesOpaqueBars = true
          self.tabBarController?.tabBar.delegate = self //This is causing crash
      }
  }
  </code></pre>
  
  <p>If I delete the <code>self.tabBarController?.tabBar.delegate = self</code> line everything works fine and my tabBar behaves as expected, but when I re-add that line I get the following crash:</p>
  
  <pre><code>ibc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>
  
  <p>Not entirely sure how to resolve this. Have found some other answers on SO but they still seemed a little unclear on what the process is to make this work.</p>
  
  <p>Thanks!</p>