title: CLLocationManager startUpdatingLocation using a UIButton
body: <p>This is the first time I am using <code>CLLocationManager</code>. I am not sure if i am doing the right thing. Correct me if i am wrong. </p>
  
  <p>I initialize the locationManager in my <code>viewDidLoad</code> Method and tell the locationManager to startUpdatingLocation in the same method. </p>
  
  <p>When the delegate receives </p>
  
  <pre><code>-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
  
      [locationManager stopUpdatingLocation];
      //do stuff with the coordinates
  }
  </code></pre>
  
  <p>to avoid repeated calls to this delegate method. </p>
  
  <p>I have a <code>UIButton</code> where users can click to update the location</p>
  
  <pre><code>//called by user action
  -(IBAction)updateLocation{
      //start updating delegate
      locationManager.delegate=self;
      [locationManager startUpdatingLocation];    
  }
  </code></pre>
  
  <p>However when the location changes and when I click the <code>UIbutton</code>, the location coordinates donot change at all. :( </p>
  
  <p>What am i doing wrong? Is this the right of doing or should i not stop the locationManager at all ?</p>
  
  <p>Help would be appreciated. </p>