2012-03-16 47 views

回答

1

是的,它可能通過mapView的委託。

- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated 
{ 
    // This method is called whenever the currently displayed map region changes. 
    // During scrolling, this method may be called many times to report updates to the map position. 
    // Therefore, your implementation of this method should be as lightweight as possible to avoid affecting scrolling performance. 
    // *Straight from Apple's documentation 

    MKMapRect visibleRect = [mapView visibleMapRect]; 
} 
+0

哎呀......這不是工作.. !!!我剛剛粘貼這個編碼我的實現,並設置debugger..And它不工作.. – iChirag 2012-03-16 11:20:08

+0

你能解釋一下到底什麼是不工作?你設置了你的mapView的代表嗎? – Alladinian 2012-03-16 15:48:48

+0

@下載更多它的作品完美。也許你忘了爲map view設置'delegate'。 :) – Kjuly 2012-05-22 14:14:19