Skip to content

Instantly share code, notes, and snippets.

@vialyx
Last active August 5, 2018 19:46
Show Gist options
  • Save vialyx/550740db418f947a4b6996c690757460 to your computer and use it in GitHub Desktop.
Save vialyx/550740db418f947a4b6996c690757460 to your computer and use it in GitHub Desktop.
final class Model {
func load(completion: @escaping ([String]) -> Void) {
// statement
}
}
final class ViewController: UIViewController {
var model: Model! = Model()
override func viewDidLoad() {
super.viewDidLoad()
model.load { [unowned self] (items) in
self.display(items: items)
}
}
private func display(items: [String]) {
// statement
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment