Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

namanhams

macrumors regular
Original poster
Jun 3, 2009
153
0
According to Apple documentation :

This method :
Code:
- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated

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.


I have tried scrolling, dragging, zooming, but this method is never been called many times. It's called only once at the start.

What i need is live updating, the same as what the document says.

Anyone knows why ? Thanks.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
The documentation says "may" not "will". The normal behaviour where there are delegates is that will is called before the event and did when the event is complete. I'd implemented

Code:
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated

as well and see if will is called once at the start of the even and did multiple times during the event.
 

namanhams

macrumors regular
Original poster
Jun 3, 2009
153
0
I try both methods and they are called only once.

I just dont know in what circumstance those methods are called more than once.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.