Problems When Removing Annotations
<p>I am attempting to loop through all of a maps annotations and check to see if it's a MKUserLocation annotation. If it's not I want to remove it so I can add some other ones. I am trying to use the code below but it crashes w /the following error: "Terminating app due to uncaught exception 'NSGenericException', reason: '<em>*</em> Collection &lt;__NSArrayM: 0x1645d0> was mutated while being enumerated."</p>

<pre><code>for(id a in [[self mapview] annotations]) {

     if([a class] != [MKUserLocation class]) {

          [[self mapview] removeAnnotation:a];

     }

}
</code></pre>

<p>How can I properly loop through all of the annotations and remove them while still ensuring that the userLocation marker isn't removed.</p>
