title: Trying to simulate a route in MapView
body: <p>I have an array of <code>CLLocation</code> objects I parsed from a file. I'd want to simulate that the user is moving along that route, and I have implemented this:</p>
  
  <pre><code>for (CLLocation *loc in simulatedLocs) {
              [self moveUser:loc];
              sleep(1);
          }
  </code></pre>
  
  <p>This is the method called in the loop:</p>
  
  <pre><code>- (void)moveUser:(CLLocation*)newLoc
  {
      CLLocationCoordinate2D coords;
      coords.latitude = newLoc.coordinate.latitude;
      coords.longitude = newLoc.coordinate.longitude;
      CustomAnnotation *annotation = [[CustomAnnotation alloc] initWithCoordinate:coords];
      annotation.title = @"User";
  
      // To remove the previous location icon
      NSArray *existingpoints = self.mapView.annotations;
      if ([existingpoints count] &gt; 0) {
          for (CustomAnnotation *annotation in existingpoints) {
              if ([annotation.title isEqualToString:@"User"]) {
                  [self.mapView removeAnnotation:annotation];
                  break;
              }
          }
      }
  
      MKCoordinateRegion region = { coords, {0.1, 0.1} };
      [self.mapView setRegion:region animated:NO];
      [self.mapView addAnnotation: annotation];
      [self.mapView setCenterCoordinate:newLoc.coordinate animated:NO];
  }
  </code></pre>
  
  <p>But only last location in the array and its region are displayed in the mapView when running the iPhone simulator. I'd like to simulate that user is "moving" each 1 sec, how could I do that?</p>
  
  <p>Thanks!</p>