This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
MGLMapViewDelegate receives didChange before isChanging if animations overlap #3062
Copy link
Copy link
Closed
Description
When the heading changes while tracking heading, MGLMapViewDelegate gets didChange before isChanging:
2015-11-17 17:32:27.856 Mapbox GL[6440:3159311] -[MBXViewController mapView:regionWillChangeAnimated:] y
2015-11-17 17:32:27.866 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.895 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.910 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.921 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.934 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.950 Mapbox GL[6440:3159311] -[MBXViewController mapView:regionDidChangeAnimated:] y {{37.4, -121.9}, {37.4, -121.9}}
2015-11-17 17:32:27.951 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.967 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:27.984 Mapbox GL[6440:3159311] -[MBXViewController mapView:regionWillChangeAnimated:] y
2015-11-17 17:32:27.985 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.000 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.017 Mapbox GL[6440:3159311] -[MBXViewController mapView:regionDidChangeAnimated:] y {{37.4, -121.9}, {37.4, -121.9}}
2015-11-17 17:32:28.017 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.034 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.050 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.067 Mapbox GL[6440:3159311] -[MBXViewController mapView:regionWillChangeAnimated:] y
2015-11-17 17:32:28.068 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.084 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.101 Mapbox GL[6440:3159311] -[MBXViewController mapView:regionDidChangeAnimated:] y {{37.4, -121.9}, {37.4, -121.9}}
2015-11-17 17:32:28.102 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.117 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.134 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.150 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.167 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.184 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.201 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.217 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.235 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.251 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.267 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.284 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.300 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.318 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.334 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.350 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
2015-11-17 17:32:28.367 Mapbox GL[6440:3159311] -[MBXViewController mapViewRegionIsChanging:]
/ref #2775
/cc @friedbunny
Activity
[-]MGLMapViewDelegate receives didChange before isChanging on tracked heading change[/-][+]MGLMapViewDelegate receives didChange before isChanging if animations overlap[/+]1ec5 commentedon Nov 18, 2015
The problem is a bit more general than I originally thought: due in part to #2313, if an animation starts before another animation finishes, the didChange notification comes in too soon and lots of isChanging notifications come in after that.
[iOS] Ensure consistent willChange/didChange notifications
[iOS] Ensure consistent willChange/didChange notifications