I have this code where in iOS6 I center a marker in the center in a mapview, it don't happen in iOS 7 why?
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
MKMapRect zoomRect = MKMapRectNull;
for (id <MKAnnotation> annotation in mapView.annotations)
{
MKMapPoint annotationP = MKMapPointForCoordinate(annotation.coordinate);
MKMapRect pointRect = MKMapRectMake(annotationP.x, annotationP.y, 7000, 7000);
if (MKMapRectIsNull(zoomRect)) {
zoomRect = pointRect;
} else {
zoomRect = MKMapRectUnion(zoomRect, pointRect);
}
}
[mapView setVisibleMapRect:zoomRect animated:YES];
}