草庐IT

currentRegion

全部标签

ios - 使用 MKUserTrackingModeFollowWithHeading 以编程方式更改缩放

我想在mapView处于MKUserTrackingModeFollowWithHeading模式时缩小以包括最近的注释。我试过这样设置区域:MKCoordinateRegioncurrentRegion=self.mapView.region;currentRegion.span.latitudeDelta*=4;currentRegion.span.longitudeDelta*=4;[self.mapViewsetRegion:currentRegion];这会将map缩小4倍,但在启用用户跟踪的情况下,iOS会通过动画自动缩放回原始缩放级别。我无法坚持任何地区。我假设MapRe