diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2016-08-23 13:59:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 13:59:26 -0400 |
commit | fcb710fafecdafd511c2a09207b2de3077caa644 (patch) | |
tree | 707a6ea18e5de59f8652e36d5a6e10637f80de77 | |
parent | c034ba4ee16b1a8fc4ff92b4672671f636dadaab (diff) | |
download | qtlocation-mapboxgl-fcb710fafecdafd511c2a09207b2de3077caa644.tar.gz |
[ios] Disable implicit animation of user annotation pitch changes (#6122)
- Subtly improves the performance of the shadow, while performing the pitch gesture.
-rw-r--r-- | platform/ios/src/MGLFaux3DUserLocationAnnotationView.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m b/platform/ios/src/MGLFaux3DUserLocationAnnotationView.m index 95a0084f9f..315bd936e4 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; } } |