Search code examples
iosskmaps

SKMaps - Stop the inertia animation


There is a point in my app that I need to apply a blur effect to the map view, so I take an snapshot of the map view, apply the blur effect and add that resulting blurred image above the map view, that works great. The problem is that when I remove this blurred view the map is displaced/zoomed/rotated because when I took this snapshot the map view was moving because of the inertia.

So, is there any way to stop the inertia once running? as when you tap on the screen.

Thanks.


Solution

  • There is no way to stop the inertia and for the moment, this scenario won't be supported.

    As a workaround you could wait for the region change to end and then take the snapshot. The region change end is notified to the SKMapViewDelegate using mapView:didEndRegionChangeToRegion: