我正在地图应用程序中工作,该应用程序在地图上呈现折线.我在缩放时遇到问题,它会将先前的折线保留在图块上.
我试图强制重绘:
[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)
有谁知道这个?