title: Downcast from UITabBarItem? to UITabBarItem only unwraps optionals; did you mean to use '!'
body: <p>My code was working well in Xcode 6. But, after updating to Xcode 7 I got nearly 20 errors and 50 warnings.This might be some syntax change in Swift 2 </p>
  
  <p>Solved all those but can't figure out this one : Downcast from UITabBarItem? to UITabBarItem only unwraps optionals; did you mean to use '!'</p>
  
  <pre><code>let tabItems = tabBar.items as! [UITabBarItem]  // Error in  this line
      for (index, value) in enumerate(tabItems)
      {
          var imageName = imageNames[index]
          value.image = UIImage(named: imageName)
          value.imageInsets = UIEdgeInsetsMake(5.0, 0, -5.0, 0)
      }
  </code></pre>
  
  <p>Please help! 
  Thanks in advance</p>