改用 (void)mapView:(MKMapView *)mv didUpdateUserLocation:(MKUserLocation *)userLocation
所以要在更新 user 位置後調整地圖至適當的大小:
- (void)mapView:(MKMapView *)mv didUpdateUserLocation:(MKUserLocation *)userLocation { MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance([userLocation coordinate], 250, 250); [mv setRegion:region animated:YES]; }
參考 forums.bignerdranch.com • View topic - Whereami under iOS 4.2.1
...
No comments:
Post a Comment