小编Jon*_*des的帖子

iOS 10 MapKit上一层缩放问题

我正在地图应用程序中工作,该应用程序在地图上呈现折线.我在缩放时遇到问题,它会将先前的折线保留在图块上.

我试图强制重绘:

[self.mapView reloadInputViews];
[self.mapView.layer setNeedsDisplay];
[self.mapView setNeedsDisplay];
Run Code Online (Sandbox Code Playgroud)

我也尝试减慢变焦速度,但问题仍然存在:

[MKMapView animateWithDuration:2
                         delay:0
        usingSpringWithDamping:0.6
         initialSpringVelocity:10
                       options:UIViewAnimationOptionCurveEaseOut
                    animations:^{
                        [self.mapView setVisibleMapRect:unionRectThatFits
                                            edgePadding:UIEdgeInsetsMake(20, 10, 20, 10)
                                               animated:YES];
                    }
                    completion: nil];
Run Code Online (Sandbox Code Playgroud)

有谁知道这个?

在此输入图像描述

iphone mapkit ios ios10

10
推荐指数
1
解决办法
887
查看次数

标签 统计

ios ×1

ios10 ×1

iphone ×1

mapkit ×1