【发布时间】:2021-11-25 10:28:54
【问题描述】:
- 我通过扩展
MKAnnotationView并覆盖[MKAnnotationView setImage:]方法创建了一个自定义注释视图。 - 当
[MKAnnotationView setImage:]方法被调用时,[MKAnnotationView setBounds:]被调用,从而[MKAnnotationView _metricsDidChange]和其他一些方法被调用。 - 我看到
[MKAnnotationView _metricsDidChange]是性能问题的瓶颈。 - 在 SDK 14 中,没有调用此类方法。
下面附上时间剖面截图:
【问题讨论】:
标签: ios performance mapkit mkannotationview