So, I have a map loaded with pins from a remote JSON channel that is loading into the application. All of this works great.
Now, from the initial experiment, regionDidChangeAnimated is called several times, so I moved my mail request to a method that uses a drag and drop card gesture recognizer, which then performs a mail request to get data from the JSON channel and reload my card contacts after deleting them. This also works great.
Now, the only problem I am facing is that if I select an annotation close to the edge of the screen, the map will move slightly to display the annotation leader. The problem is that regionDidChangeAnimated is called when this happens, but my mail request does not work, as I call it, using a gesture recognizer, and therefore the map was not moved by user intervention, but by the OS. I donβt want to move my send request to regionDidChangeAnimated , as this has been called several times, but I would like to know if there is a way to do the test if the user made the card move or did it by itself to adjust the leader, as described above. regionDidChangeAnimated from the study I looked at may get more time than necessary, so some recommendations will be useful in how to prevent this or to detect user interaction with the OS moving the map.
source share