我的这段代码适用于 iOS 6,但不会对 iOS 7 产生影响。当设置跨度不起作用时,如何让它适用于 iOS 7?
CLLocationCoordinate2D ctrpoint = self.location.coordinate;
MapPoint *mp = [[MapPoint alloc] initWithCoordinate:ctrpoint title:[NSString stringWithFormat:@"%@: %@",NSLocalizedString(@"Pin Name:", @"Pin Name:"),self.pin.name] subtitle:self.pin.cell];
[self.mapView addAnnotation:mp];
MKCoordinateSpan span;
span.latitudeDelta = 0.2;
span.longitudeDelta = 0.2;
MKCoordinateRegion region;
region.span = span;
region.center = self.location.coordinate;
[self.mapView setRegion:region animated:YES];