I am adding around 1000 MKPolygon
s onto an MKMapView
.
After adding the overlays onto the MKMapView
it works fine. However if I zoom in and
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