努力将其转换为Swift 3.你能帮忙吗?
dispatch_async(dispatch_get_main_queue()) { () -> Void in
self.delegate.locationDidUpdateToLocation(self.currentLocation!)
NSNotificationCenter.defaultCenter().postNotificationName(kLocationDidChangeNotification, object: self, userInfo: userInfo as [NSObject : AnyObject])
}
非常感谢!
答案 0 :(得分:1)
我不确定该委托方法是什么,但其余部分看起来像这样:
DispatchQueue.main.async {
NotificationCenter.default.post(name: notification_name, object: self, userInfo:userInfo )
}
我不确定kLocationDidChangeNotification