Skip to content

Instantly share code, notes, and snippets.

@bartjacobs
Created January 27, 2019 09:53
Show Gist options
  • Save bartjacobs/0295cba14f64d2c94fb7ae836bd1d7f5 to your computer and use it in GitHub Desktop.
Save bartjacobs/0295cba14f64d2c94fb7ae836bd1d7f5 to your computer and use it in GitHub Desktop.
Five Signs of Code Smell in Swift - 2
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == addItemViewController {
if let navigationController = segue.destinationViewController as? UINavigationController,
let addItemViewController = navigationController.viewControllers.first as? AddItemViewController {
addItemViewController.delegate = self
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment