Skip to content
Permalink
Browse files

* Swift 4.2 support

* updated to newest RxSwift
* version bump
  • Loading branch information...
fassko committed Sep 20, 2018
1 parent b499e2b commit 309513134090bd5f020fd6f87a15acb2b98f85ae
@@ -1 +1 @@
4.0
4.2
@@ -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
@@ -92,7 +92,9 @@
18B31256E26057A42427A9D8 /* Pods */,
C5DC889F0D573D4FC922070D /* Frameworks */,
);
indentWidth = 4;
sourceTree = "<group>";
tabWidth = 4;
};
607FACD11AFB9204008FA782 /* Products */ = {
isa = PBXGroup;
@@ -169,7 +171,6 @@
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
D9E68E60EB1FF780DACADE02 /* [CP] Embed Pods Frameworks */,
1CA317E1D2F6DB261B1AA117 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -189,7 +190,6 @@
63B65A8F1FB9F59100C630B5 /* Frameworks */,
63B65A901FB9F59100C630B5 /* Resources */,
84B95A7573E55E3A0E6B4E98 /* [CP] Embed Pods Frameworks */,
0AAB1CB9E5A806F49B657977 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -263,36 +263,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0AAB1CB9E5A806F49B657977 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxAnimated-Example-AppleTV/Pods-RxAnimated-Example-AppleTV-resources.sh\"\n";
showEnvVarsInLog = 0;
};
1CA317E1D2F6DB261B1AA117 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxAnimated_Example/Pods-RxAnimated_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
51F34FCC7BA2005E5DBC466C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -317,7 +287,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-RxAnimated-Example-AppleTV/Pods-RxAnimated-Example-AppleTV-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-RxAnimated-Example-AppleTV/Pods-RxAnimated-Example-AppleTV-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RxAnimated-tvOS/RxAnimated.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa-tvOS/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift-tvOS/RxSwift.framework",
@@ -330,7 +300,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxAnimated-Example-AppleTV/Pods-RxAnimated-Example-AppleTV-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RxAnimated-Example-AppleTV/Pods-RxAnimated-Example-AppleTV-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
C12E71681698B18661CFB637 /* [CP] Check Pods Manifest.lock */ = {
@@ -357,7 +327,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-RxAnimated_Example/Pods-RxAnimated_Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-RxAnimated_Example/Pods-RxAnimated_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RxAnimated-iOS/RxAnimated.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa-iOS/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift-iOS/RxSwift.framework",
@@ -370,7 +340,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxAnimated_Example/Pods-RxAnimated_Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RxAnimated_Example/Pods-RxAnimated_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@@ -474,6 +444,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -519,6 +490,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -535,7 +507,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -551,7 +523,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
@@ -575,7 +547,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
};
@@ -599,7 +571,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.RxAnimated-ExampleAppleTV.RxAnimated-Example-AppleTV";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
};
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -40,7 +40,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -70,7 +69,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
@@ -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
@@ -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
@@ -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
@@ -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)
}
@@ -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)
}

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

0 comments on commit 3095131

Please sign in to comment.
You can’t perform that action at this time.