Skip to content

Commit

Permalink
Merge pull request airbnb#1114 from zenangst/improve/animation-view
Browse files Browse the repository at this point in the history
Improve animation view
  • Loading branch information
buba447 committed Jan 27, 2020
2 parents 9d37b62 + 1c5c021 commit 9d6dae0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lottie-swift/src/Public/Animation/AnimationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,6 @@ final public class AnimationView: LottieView {
commonInit()
}

deinit {
NotificationCenter.default.removeObserver(self)
}

// MARK: - Public (UIView Overrides)

override public var intrinsicContentSize: CGSize {
Expand Down Expand Up @@ -824,6 +820,9 @@ final public class AnimationView: LottieView {
}

override func animationMovedToWindow() {
/// Don't update any state if both the `superview` and `window` is `nil`
guard window != nil && superview != nil else { return }

if window != nil {
updateAnimationForForegroundState()
} else {
Expand Down

0 comments on commit 9d6dae0

Please sign in to comment.