0
나는 객관적인 C 코드를 신속하게 번역하려고 노력 중입니다. 지금까지했지만 일부 오류가 발생했습니다. 어떤 도움을 주셔서 감사합니다.swatch에서 dispatch_async 번역
내가 이런 식으로 한 빠른 버전dispatch_async(dispatch_get_main_queue(), ^{
[self.window.rootViewController presentViewController:self.incomingCall animated:YES completion:nil];
하지만 난 오류 얻을 :
dispatch_async(dispatch_get_main_queue(), {() -> Void in
// Show the alert
self.window?.rootViewController?.present(self.iincomingCall(), animated: true, completion: nil)
})
입니다? 스위프트 버전은 무엇입니까? 2 또는 3? – rmaddy
Swift 3을 사용하는 경우 http://stackoverflow.com/questions/37801370/how-do-i-dispatch-sync-dispatch-async-dispatch-after-etc-in-swift-3?rq=1을 참조하십시오. – rmaddy