wangmingming 6 tahun lalu
induk
melakukan
ccaf2977d8
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Sources/Views/AnimatedImageView.swift

+ 1 - 1
Sources/Views/AnimatedImageView.swift

@@ -128,7 +128,7 @@ open class AnimatedImageView: UIImageView {
     /// Set this property to `RunLoop.Mode.default` will make the animation pause during UIScrollView scrolling.
     /// Set this property to `RunLoop.Mode.default` will make the animation pause during UIScrollView scrolling.
     public var runLoopMode = KFRunLoopModeCommon {
     public var runLoopMode = KFRunLoopModeCommon {
         willSet {
         willSet {
-            guard runLoopMode == newValue else { return }
+            guard runLoopMode != newValue else { return }
             stopAnimating()
             stopAnimating()
             displayLink.remove(from: .main, forMode: runLoopMode)
             displayLink.remove(from: .main, forMode: runLoopMode)
             displayLink.add(to: .main, forMode: newValue)
             displayLink.add(to: .main, forMode: newValue)