Skip to content

Commit

Permalink
Merge pull request airbnb#868 from Coeur/unknownDefault
Browse files Browse the repository at this point in the history
Switch covers known cases, but 'UIView.ContentMode' may have additional unknown values
  • Loading branch information
buba447 committed Apr 16, 2019
2 parents 2bc49f3 + f54e3c7 commit 0a13a8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lottie-swift/src/Public/Animation/AnimationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a13a8c

Please sign in to comment.