Skip to content

Instantly share code, notes, and snippets.

@spotlessicode
Last active September 20, 2016 09:36
Show Gist options
  • Select an option

  • Save spotlessicode/8956ee8d40e2b0d62f348bc67af0457f to your computer and use it in GitHub Desktop.

Select an option

Save spotlessicode/8956ee8d40e2b0d62f348bc67af0457f to your computer and use it in GitHub Desktop.
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if (segue.identifier! == "CustomSegue") {
//with Navigation Controller
//let navController = segue.destination as! UINavigationController
//let detailController = ((navController.topViewController) as! SecondViewController)
//without NavigationController:
let detailController = (segue.destination as! SecondViewController)
detailController.colorstring = "purple"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment