Exception when zooming with overlays on MKMapView: NSInvalidArgumentException NSSetM removeObject: object cannot be nil

后端 未结 1 1902
梦毁少年i
梦毁少年i 2021-02-02 03:41

I am adding around 1000 MKPolygons onto an MKMapView. After adding the overlays onto the MKMapView it works fine. However if I zoom in and

相关标签:
1条回答
  • 2021-02-02 04:18

    I had a very similar problem when adding & removing annotations to a map view.

    The answer turned out to be put everything that accesses the annotations - even calculations that only read the annotations array - onto the main thread.

    I had only put the actual adding & removing on the main thread and it was ok for the most part, but would randomly crash with

    [__NSSetM removeObject:]: object cannot be nil

    0 讨论(0)
提交回复
热议问题