title: Select a tab bar item programmatically (not using UITabBarController)
body: <p>I have a view derived from UIViewControler (not UITabBarController). In this view I added a tab bar with several tab bar items. I used the UITabBarDelegate to allow the view to do something when users tap on each tab bar item.</p>
  
  <pre><code>class MyViewController: UIViewController, UITabBarDelegate {
  
      func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem!) {
          // do something
      }
  }
  </code></pre>
  
  <p>My question is how we can programmatically select the first tab bar item when the view is first loaded? Note that I would want the first tab item to be in "active" state also.</p>
  
  <p>Again, I'm not using UITabBarController</p>
  
  <p>Thanks</p>