Instead of loading all annotations that are in my array, I would only like to load the annotations that the user could currently see cased on how far they are zoomed in on the map. So, if the user pans to a place where there are annotations, those would be added, and if they pan away, those would be removed. I assume this would h开发者_如何学JAVAelp with memory.
Does anyone know how to do something like this? And, is it worth it, or needed?
It is not needed. MapKit takes care of optimizing the display and allocation of annotation views. You should load all your annotations and let the framework do its job, just as the documentation advises.
The annotations themselves should be quite small, and should not have a significant hit on memory use.
精彩评论