gpt4 book ai didi

swift map 套件 : need to move map to show annotations after using addAnnotations()

转载 作者:行者123 更新时间:2023-11-30 11:00:11 25 4
gpt4 key购买 nike

使用 addAnnotations() 添加注释数组后,我需要移动 map (使用鼠标)才能显示注释!这很烦人。哈哈

有人知道如何解决这个问题吗?

最佳答案

建议在主线程进行UI更改,是否在主线程添加注释?

添加注释时,请尝试以下操作:

DispatchQueue.main.async {  

yourMapView.addAnnotation(annotation)
}

如果您还有其他问题或者问题是否解决了,请告诉我

关于 swift map 套件 : need to move map to show annotations after using addAnnotations(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53471029/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com