I'm doing an asynchronous
HTTP POST Task, on Completion I need to send back the result to the launcher viewcontroller
.I have hooked on to the completion handler and everything works as intended. But I cannot properly declare the Return Variable due to this error
Implicit use of 'self' in closure; use 'self.' to make capture semantics explicit
dourltask() { isValid in
// do something with the returned Bool
DispatchQueue.main.async {
self.spinner.isHidden=true;
self.spinner.stopAnimation(self) if(isValid) {
Error ----> if let presenter presenting as? ViewController {
if(isValid) {
presenter.bvalue=false
}
}
}