|
@@ -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)
|