在我的代码中,我正在调用
- (IBAction)goToUserLocation:(id)sender {
[mapView setUserTrackingMode:MKUserTrackingModeFollow animated:YES];
}
然后有这个回调
- (MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id <MKAnnotation>)annotation
{
// I then try to set the region in here, which doesnt always work. Sometimes it zooms into the user location, then zooms back out to the region I specify. Other times, it will just stay zoomed in.
}
MKUserTrackingModeFollow 比我想要的放大得多。我希望能够设置它,以便它放大到我指定的区域。是否有适当的方法来执行此操作,或者是否设置了 MKUserTrackingModeFollow 的区域?
谢谢!