Skip to content

Commit

Permalink
Merge branch 'fassko-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
icanzilb committed Sep 22, 2018
2 parents b499e2b + 42622d9 commit d0bd22a
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 184 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.2
2 changes: 1 addition & 1 deletion Example/Example for RxAnimated AppleTV/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
8 changes: 4 additions & 4 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ use_frameworks!

target 'RxAnimated_Example' do

pod 'RxSwift', '~> 4.0.0'
pod 'RxCocoa', '~> 4.0.0'
pod 'RxSwift', '~> 4.3.0'
pod 'RxCocoa', '~> 4.3.0'
pod 'RxAnimated', :path => '../'

end

target 'RxAnimated-Example-AppleTV' do

pod 'RxSwift', '~> 4.0.0'
pod 'RxCocoa', '~> 4.0.0'
pod 'RxSwift', '~> 4.3.0'
pod 'RxCocoa', '~> 4.3.0'
pod 'RxAnimated', :path => '../'

end
173 changes: 8 additions & 165 deletions Example/RxAnimated.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,7 +40,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -70,7 +69,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
8 changes: 5 additions & 3 deletions RxAnimated.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'RxAnimated'
s.version = '0.4.1'
s.version = '0.5.0'
s.summary = 'Animated bindings for RxSwift/RxCocoa'

s.description = <<-DESC
Expand All @@ -27,7 +27,9 @@ Pod::Spec.new do |s|
# end

s.frameworks = 'UIKit'
s.dependency 'RxSwift', '~> 4.0'
s.dependency 'RxCocoa', '~> 4.0'
s.dependency 'RxSwift', '~> 4.3'
s.dependency 'RxCocoa', '~> 4.3'

s.swift_version = "4.2"

end
4 changes: 2 additions & 2 deletions RxAnimated/Core/RxAnimated+animations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import RxCocoa
public enum FlipDirection {
case left, right, top, bottom

var viewTransition: UIViewAnimationOptions {
var viewTransition: UIView.AnimationOptions {
switch self {
case .left: return .transitionFlipFromLeft
case .right: return .transitionFlipFromRight
Expand Down Expand Up @@ -42,7 +42,7 @@ extension AnimatedSink where Base: UIView {
return AnimatedSink<Base>(base: self.base, type: type)
}

public func animation(duration: TimeInterval, options: UIViewAnimationOptions = [], animations: @escaping ()->Void) -> AnimatedSink<Base> {
public func animation(duration: TimeInterval, options: UIView.AnimationOptions = [], animations: @escaping ()->Void) -> AnimatedSink<Base> {
let type = AnimationType<Base>(type: RxAnimationType.animation, duration: duration, animations: { _ in animations() })
return AnimatedSink<Base>(base: self.base, type: type)
}
Expand Down
10 changes: 5 additions & 5 deletions RxAnimated/Core/RxAnimated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public struct RxAnimated {
*/
public enum RxAnimationType {
case animation
case transition(UIViewAnimationOptions)
case transition(UIView.AnimationOptions)
case spring(damping: CGFloat, velocity: CGFloat)
}

Expand All @@ -29,7 +29,7 @@ public enum RxAnimationType {
public struct AnimationType<Base> {
let type: RxAnimationType
let duration: TimeInterval
let options: UIViewAnimationOptions
let options: UIView.AnimationOptions

let setup: ((UIView)->Void)?
let animations: ((UIView)->Void)?
Expand All @@ -44,7 +44,7 @@ public struct AnimationType<Base> {
* - parameter animations: block of code to be executed during animation
* - parameter completion: block of code to be executed after the animation has finished
*/
public init(type: RxAnimationType, duration: TimeInterval, options: UIViewAnimationOptions = [], setup: ((UIView)->Void)? = nil, animations: ((UIView)->Void)?, completion: ((Bool)->Void)? = nil) {
public init(type: RxAnimationType, duration: TimeInterval, options: UIView.AnimationOptions = [], setup: ((UIView)->Void)? = nil, animations: ((UIView)->Void)?, completion: ((Bool)->Void)? = nil) {
self.type = type
self.duration = duration
self.options = options
Expand Down Expand Up @@ -93,10 +93,10 @@ public struct AnimationType<Base> {
return ProcessInfo.processInfo.isLowPowerModeEnabled
|| ProcessInfo.processInfo.thermalState == .serious
|| ProcessInfo.processInfo.thermalState == .critical
|| UIAccessibilityIsReduceMotionEnabled()
|| UIAccessibility.isReduceMotionEnabled
} else {
return ProcessInfo.processInfo.isLowPowerModeEnabled
|| UIAccessibilityIsReduceMotionEnabled()
|| UIAccessibility.isReduceMotionEnabled
}
}
}
Expand Down

0 comments on commit d0bd22a

Please sign in to comment.