UIViewController no longer has members topViewController or viewControllers in XCode 7 <p>After updating to XCode 7 and converting my project to the latest Swift 2 syntax, there is one error I cannot seem to fix. I have a segue to a navigation controller and need to pass data to the top view controller in its stack. The following has always worked until now:</p> <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { let destinationVC = segue.destinationViewController.viewControllers[0] as! MYViewController // OR let destinationVC = segue.destinationViewController.topViewController as! MYViewController // ... } </code></pre> <p>But now the compiler gives error: </p> <p><code>Value of type 'UIViewController' has no member 'viewControllers'</code> or <code>Value of type 'UIViewController' has no member 'topViewController'</code></p> <p>I do not see how else to access the view controller(s) on the stack. Any ideas? Thanks in advance!</p>