Whenever the user scrolls map or zooms in/out, this method gets called instantaneously. I want to delay the call to this method by say 2 secs. Is it possible to do that?
Whenever the user scrolls map or zooms in/out, this method gets called instantaneously. I
Share
You could implement that method like this:
Then, somewhere in the same class:
Of course, if you don’t need one of those arguments (either
mapVieworanimated), you could make this considerably simpler by only passing the one you did need.If you can’t just edit the code for your
MKMapViewDelegate, perhaps you could do something similar with method swizzling, although then you’re getting really hacky.