title: Detect when a tab bar item is pressed
body: <p>I have a root view controller which isn’t set as the custom class for any of my view controllers on my storyboard. Instead, all of my view controllers are subclassing this class like so.</p>
  
  <pre><code>// RootViewController
  class RootViewController: UIViewController, UITabBarDelegate { 
  
      // This is not getting executed on any of the view controllers
      func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem) {
          print("ddd")
      }
  }
  
  // Subclassing it 
  class TopStoriesViewController: RootViewController {
  
  }
  </code></pre>
  
  <p>But I seem to be struggling with doing something when a tabbaritem is pressed on the view controller which is subclassing the rootviewcontroller, i.e, the message is not being printed.</p>