Skip to content

Instantly share code, notes, and snippets.

@uberbruns
Created June 14, 2014 11:57
Show Gist options
  • Save uberbruns/f56e8e90fb2967229c1a to your computer and use it in GitHub Desktop.
Save uberbruns/f56e8e90fb2967229c1a to your computer and use it in GitHub Desktop.
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
var detailViewContoller: UIViewController?
if (segue.identifier == "ShowDetail") {
detailViewContoller = segue.destinationViewController as? UIViewController
} else if (segue.identifier == "ShowDetailWithNavigationController") {
let navigationController = segue.destinationViewController as UINavigationController
detailViewContoller = navigationController.viewControllers[0] as? UIViewController
}
if let dvc = detailViewContoller {
dvc.title = "\(NSDate().description)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment