0
我正在做一個asynchronous
HTTP POST任務,完成時我需要將結果發送回啓動器viewcontroller
。我掛鉤了完成處理程序,並且一切按預期工作。但我不能正確地申報返回變量,由於這個錯誤在任務完成時設置啓動器視圖控制器的變量
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
}
}
}
'if let presenter = self.presenting as? ViewController {' –
@LeoDabus謝謝。 – techno
@Jack ...我打算接受你的回答......似乎你刪除了它。 – techno