I am having a hard time getting my annotation's subtitle to update, I am calling it on the main thread and ensuring that the result is correct.
Can anyone see why it would not be updating?
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
})
})
You can't change an annotation in the map. Remove this annotation and replace it with one that has the same coordinates but the new subtitle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With