Skip to content

Instantly share code, notes, and snippets.

@yunustek
Created October 7, 2018 17:00
Show Gist options
  • Save yunustek/d8bf48e8209af91540a33862fd877d79 to your computer and use it in GitHub Desktop.
Save yunustek/d8bf48e8209af91540a33862fd877d79 to your computer and use it in GitHub Desktop.
View Controller Canlılığını Kontrol Etme networkRequest
networkRequest.fetchData() { [weak self] result in
guard let self = self else { return }
switch result {
case .Succeeded(let data):
self.processData(data)
case .Failed(let err):
self.handleError(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment