From b499e2b8173ad49b0606c94aed4025d461ec70f1 Mon Sep 17 00:00:00 2001 From: Tomoki_Takahashi Date: Fri, 13 Apr 2018 18:01:02 +0900 Subject: [PATCH] Merge pull request #19 from tomokitakahashi/master --- Example/Example for RxAnimated AppleTV/ViewController.swift | 4 ++-- Example/RxAnimated/ViewController.swift | 4 ++-- RxAnimated/Core/RxAnimated.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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