我在更新我的注释副标题时遇到了困难,我正在主线程上调用它并确保结果是正确的。
有人能看出为什么它没有更新吗?
let stopAnnotation: UUStopAnnotation = view.annotation as! UUStopAnnotation
// Else get the stop estimation
webService?.getStopEstimation(routeId: stopAnnotation.routeId, stopId: stopAnnotation.stopId, completion: { (result) in
print(result)
DispatchQueue.main.async(execute: {
stopAnnotation.subtitle = result
})
})