title: MKReverseGeocoder deprecated
body: <p>I just saw that MKReverseGeocoder is deprecated. Question is, how do you change to CLGeocoder the easiest way? Sorry for the extremely long source code (i think you think it's pretty simple, but im new to this). This is what I got before... </p>
  
  <p>StoreLocation.h</p>
  
  <pre><code>@interface StoreLocation : NSObject &lt;MKAnnotation&gt; {
  
      CLLocationCoordinate2D coordinate;
  
  }
  
  @property (nonatomic, readwrite) CLLocationCoordinate2D coordinate;
  @property (nonatomic, readwrite) NSString *subtitle;
  
  -(id)initWithCoordinate:(CLLocationCoordinate2D) coordinate;
  
  - (NSString *)subtitle;
  
  - (NSString *)title;
  
  @end
  </code></pre>
  
  <p>StoreLocation.m</p>
  
  <pre><code>@implementation StoreLocation
  @synthesize coordinate,subtitle;
  
  -(NSString *)subtitle{
  
      NSUserDefaults *userDef = [NSUserDefaults standardUserDefaults];
      if ([userDef boolForKey:@"SavedAddress"]) {
          NSString *savedAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"SavedAddress"];
          return savedAddress;
      }
      else {
          return subtitle;
      }
  }
  
  -(id)initWithCoordinate:(CLLocationCoordinate2D) coor{
      self.coordinate=coor;
      return self;
  }
  
  
  - (void)setCoordinate:(CLLocationCoordinate2D)coor {
      MKReverseGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:coor];
      geocoder.delegate = self;
      coordinate = coor;
      [geocoder start];
  }
  
  - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error {
      NSLog(@"fail %@", error);
  }
  
  - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark {
      self.subtitle = [placemark.addressDictionary valueForKey:@"Street"];
  
      NSUserDefaults *userDef = [NSUserDefaults standardUserDefaults];
      [userDef setValue:subtitle forKey:@"SavedAddress"];
  }
  </code></pre>
  
  <p>MapViewController.m</p>
  
  <pre><code>    -(void) locationManager: (CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation*)oldLocation{
  
      MKGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:location];
          [geocoder start];
      }
  
  
      - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
          NSString *streetAddress = [NSString stringWithFormat:@"%@, %@",
                                     [placemark.addressDictionary objectForKey:(NSString *)kABPersonAddressStreetKey],
                                     [placemark.addressDictionary objectForKey:(NSString *)kABPersonAddressCityKey]];
  
          mapView.userLocation.subtitle = streetAddress;      
      }
  -(IBAction)storeLocation {
  
      StoreLocation *position=[[StoreLocation alloc] initWithCoordinate:location];    [mapView addAnnotation:position]; }
  
  
      - (MKAnnotationView *)mapView:(MKMapView *)mapview
                  viewForAnnotation:(id &lt;MKAnnotation&gt;)dropPin
      {
          if ([dropPin isKindOfClass:MKUserLocation.class])
          {
              return nil;
          }
  
          MKPinAnnotationView *pinView = (MKPinAnnotationView*)[mapview dequeueReusableAnnotationViewWithIdentifier:@"annot"];
          if (!pinView)
          {
              pinView = [[MKPinAnnotationView alloc] initWithAnnotation:dropPin reuseIdentifier:@"annot"];
              pinView.canShowCallout = YES;
          }
          else {
              pinView.annotation = dropPin;
          }
          return pinView;
      }
  </code></pre>
  
  <p>Thanks a thousand times! </p>