diff --git a/Example/Example for RxAnimated AppleTV/ViewController.swift b/Example/Example for RxAnimated AppleTV/ViewController.swift index 0e9b1cb..1b5a466 100644 --- a/Example/Example for RxAnimated AppleTV/ViewController.swift +++ b/Example/Example for RxAnimated AppleTV/ViewController.swift @@ -131,10 +131,10 @@ class ViewController: UIViewController { // disable animations manually DispatchQueue.main.asyncAfter(deadline: .now() + 10.0, execute: { - RxAnimated.areAnimationsEnabled.value = false + RxAnimated.areAnimationsEnabled.accept(false) }) DispatchQueue.main.asyncAfter(deadline: .now() + 15.0, execute: { - RxAnimated.areAnimationsEnabled.value = true + RxAnimated.areAnimationsEnabled.accept(true) }) } diff --git a/Example/RxAnimated/ViewController.swift b/Example/RxAnimated/ViewController.swift index a2f8753..b6e6d51 100644 --- a/Example/RxAnimated/ViewController.swift +++ b/Example/RxAnimated/ViewController.swift @@ -133,10 +133,10 @@ class ViewController: UIViewController { // disable animations manually DispatchQueue.main.asyncAfter(deadline: .now() + 10.0, execute: { - RxAnimated.areAnimationsEnabled.value = false + RxAnimated.areAnimationsEnabled.accept(false) }) DispatchQueue.main.asyncAfter(deadline: .now() + 15.0, execute: { - RxAnimated.areAnimationsEnabled.value = true + RxAnimated.areAnimationsEnabled.accept(true) }) } } diff --git a/RxAnimated/Core/RxAnimated.swift b/RxAnimated/Core/RxAnimated.swift index 06c875f..632bac2 100644 --- a/RxAnimated/Core/RxAnimated.swift +++ b/RxAnimated/Core/RxAnimated.swift @@ -2,7 +2,7 @@ import RxSwift import RxCocoa public struct RxAnimated { - public static let areAnimationsEnabled = Variable(true) + public static let areAnimationsEnabled = BehaviorRelay(value: true) fileprivate static var areDefaultHeuristicsEnabled = false public static func enableDefaultPerformanceHeuristics() { areDefaultHeuristicsEnabled = true