views:

197

answers:

1

I need to know whether a regionWillChangeAnimated occurred due to zooming or panning.

I was able to figure this out for regionDidChangeAnimated by keeping track of the old region span and comparing with the new one to see if a zoom occurred.

The problem with regionWillChangeAnimated is that it is called before the region changes so I have no way to know what the region span will be.

Is there another way perhaps to figure this out?

Thanks.

A: 

i believe you will need to get the current region span and center data in the regionWillChangeAnimated call and compare it once you get to the regionDidChangeAnimated call but dont do too much logic in there or it can make the user interaction choppy.

AtomRiot
Yeah the problem is I need to know whether a zoom occurs *while* the map is being zoomed and not only *after* its been zoomed so I can't rely on regionDidChangeAnimated.
Nebs