title: swift: Move annotation from one coordinate to another
body: <p>I have been trying to move annotation (custom) on map from one coordinate to another but couldn't find a better way to do it. I have searched online but couldn't find anything useful.</p>
  
  <p>Anyone who was successful in implementing such functionality (in swift)?</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>var annMove: CustomAnnotation = CustomAnnotation();
      annMove.title = "Moving annotation"
      annMove.subtitle = ""
      annMove.imageName = "blue_pin.png"
      self.mapView.addAnnotation(annMove);
      for i in 0..&lt;route.count
      {
          annMove.coordinate = route[i];
      }
  </code></pre>
  
  <p><strong>CustomAnnotation</strong></p>
  
  <pre><code>class CustomAnnotation: MKPointAnnotation {
  var imageName: String!
  </code></pre>
  
  <p>}</p>
  
  <p>When I ran the code, all I can see is an annotation at coordinate <code>route[0]</code>. If the annotation did move then at least the it should be at the coordinate <code>route[route.count-1]</code> but not <code>route[0]</code></p>