MKMapView regionDidChangeAnimated not always called!

后端 未结 5 1791
北荒
北荒 2021-01-17 14:31

This is frustrating me!!!

It will be called most of the time but then it stops responding to the pinches. It will be called on a screen rotate and a double tap. No

5条回答
  •  轮回少年
    2021-01-17 15:26

    Whenever a tap gesture recognizer added to the mapview, setting

    recognizer.cancelsTouchesInView = NO;
    

    takes care of the problem if your business logic allows for double processing if touches on mapview (by MKMapView AND the gesture recognizer that was most recently interfering with the region[Will,Did]ChangeAnimated:)

提交回复
热议问题