From f54e3c72b30917efe376229d241a150d815931e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20C=C5=93ur?= Date: Tue, 16 Apr 2019 14:41:12 +0800 Subject: [PATCH] Switch covers known cases, but 'UIView.ContentMode' may have additional unknown values, possibly added in future versions --- lottie-swift/src/Public/Animation/AnimationView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lottie-swift/src/Public/Animation/AnimationView.swift b/lottie-swift/src/Public/Animation/AnimationView.swift index 4e1af121e8..1650e48b2b 100644 --- a/lottie-swift/src/Public/Animation/AnimationView.swift +++ b/lottie-swift/src/Public/Animation/AnimationView.swift @@ -608,6 +608,9 @@ final public class AnimationView: LottieView { position.x = bounds.maxX - animation.bounds.midX position.y = bounds.maxY - animation.bounds.midY xform = CATransform3DIdentity + @unknown default: + print("unsupported contentMode: \(contentMode.rawValue); please update lottie-ios") + xform = CATransform3DIdentity } animationLayer.position = position animationLayer.transform = xform