I have this code for my iOS application:
NSString *location = [[NSString alloc] initWithFormat:@"%@, %@", [self.campus campusStreetAddress], [self.campus campusCityStateZip]]; CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:location completionHandler:^(NSArray* placemarks, NSError* error){ if (placemarks && placemarks.count > 0) { CLPlacemark *topResult = [placemarks objectAtIndex:0]; MKPlacemark *placemark = [[MKPlacemark alloc] initWithPlacemark:topResult]; MKCoordinateRegion region = self.campusMap.region; region.center = placemark.region.center;
But, when I upgraded my app to iOS 7, placemark.region.center was deprecated. Is there a replacement I should use? Is this even the right way to create a map in a view?
Thanks!!
ios ios7 maps
jordangrogan
source share