Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created April 24, 2018 12:53
Show Gist options
  • Save vialyx/6790507447f72d8bcd5b1a742a1f23bb to your computer and use it in GitHub Desktop.
Save vialyx/6790507447f72d8bcd5b1a742a1f23bb to your computer and use it in GitHub Desktop.
lazy var loginCompletion: (Bool) -> Void = { [weak self] success in
if let `self` = self, success {
self.navigationController?.popToRootViewController(animated: true)
}
}
/*
[weak self] is closure capture list. It can be added all parameters what you need.
i.e. [weak self, unowned delegate]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment