From fcb710fafecdafd511c2a09207b2de3077caa644 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Tue, 23 Aug 2016 13:59:26 -0400 Subject: [PATCH] [ios] Disable implicit animation of user annotation pitch changes (#6122) - Subtly improves the performance of the shadow, while performing the pitch gesture. --- platform/ios/src/MGLFaux3DUserLocationAnnotationView.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m index 95a0084f9..315bd936e 100644 --- a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m +++ b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m @@ -77,11 +77,17 @@ const CGFloat MGLUserLocationAnnotationArrowSize = MGLUserLocationAnnotationPuck { if (self.mapView.camera.pitch != _oldPitch) { + // disable implicit animation + [CATransaction begin]; + [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; + CATransform3D t = CATransform3DRotate(CATransform3DIdentity, MGLRadiansFromDegrees(self.mapView.camera.pitch), 1.0, 0, 0); self.layer.sublayerTransform = t; [self updateFaux3DEffect]; + [CATransaction commit]; + _oldPitch = self.mapView.camera.pitch; } }