Skip to content

Instantly share code, notes, and snippets.

@titoaesj
Created October 16, 2017 13:21
Show Gist options
  • Save titoaesj/1ce53dc334f4fdca8665b6c2a1eeb82e to your computer and use it in GitHub Desktop.
Save titoaesj/1ce53dc334f4fdca8665b6c2a1eeb82e to your computer and use it in GitHub Desktop.
Sempre que a segue de destino for uma UINavigationController usar o seguinte trecho de código.
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "meu_identificador" {
if let destinationNavigationController = segue.destination as? UINavigationController,
let targetController = destinationNavigationController.topViewController as? meu_controller {
...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment