Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序中有一点需要对地图视图应用模糊效果,因此我拍摄地图视图的快照,应用模糊效果并将生成的模糊图像添加到地图视图上方,效果很好。问题是,当我移除这个模糊视图时,地图会移位/缩放/旋转,因为当我拍摄这张快照时,地图视图会因为惯性而移动。
那么,有没有什么办法可以让惯性一跑就停止呢?就像你点击屏幕一样。
谢谢。
没有办法阻止惯性,暂时不支持这种情况。
作为一种解决方法,您可以等待区域更改结束,然后拍摄快照。使用 SKMapViewDelegate 通知区域更改结束mapView:didEndRegionChangeToRegion:
mapView:didEndRegionChangeToRegion: