title: Swift tab bar view prepareforsegue
body: <p>In VC1 (collection view) this is my prepareforsegue code:</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      let segue = segue.destinationViewController as TabBarViewController
  
  
      var selectedIndex = self.collectionView.indexPathForCell(sender as UICollectionViewCell)
  
      segue.selectedIndexPassing = selectedIndex?.row
  
  }
  </code></pre>
  
  <p>When I get to VC2 (which is TabBarViewController), I println() selectedIndexPassing to see what returns. It returns correctly. And then, in VC2, I call this prepareforsegue to get to the actual view controller, or the first button in the tab bar:</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      var segue = segue.destinationViewController as PlayerFromRosterViewController
      segue.selectedIndexPassingForDisplay = 1
  }
  </code></pre>
  
  <p>However, when I println() the <code>selectedIndexPassingForDisplay</code> in VC3 (PlayerFromRosterViewController) I get nil. Why isn't the variable passing from the Tab Bar navigation controller to VC3, AKA the first tab bar button view. </p>