Permalink
Browse files

fix RxCocoa compilation error in macos in Xcode 10

  • Loading branch information...
carlosypunto committed Sep 18, 2018
1 parent 16ea4bd commit c8ad967876813f737dede558f916082099b9e9d6
View
@@ -395,8 +395,13 @@ extension Reactive where Base: UISegmentedControl {
if value != nil {
let transition = CATransition()
transition.duration = 0.25
#if swift(>=4.2)
transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
transition.type = CATransitionType(rawValue: transitionType)
#else
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
transition.type = transitionType
#endif
control.layer?.add(transition, forKey: kCATransition)
}
}
@@ -37,13 +37,21 @@ open class RxTextFieldDelegateProxy
fileprivate let textSubject = PublishSubject<String?>()
// MARK: Delegate methods
#if swift(>=4.2)
open func controlTextDidChange(_ notification: Notification) {
let textField: NSTextField = castOrFatalError(notification.object)
let nextValue = textField.stringValue
self.textSubject.on(.next(nextValue))
_forwardToDelegate?.controlTextDidChange?(notification)
}
#else
open override func controlTextDidChange(_ notification: Notification) {
let textField: NSTextField = castOrFatalError(notification.object)
let nextValue = textField.stringValue
self.textSubject.on(.next(nextValue))
_forwardToDelegate?.controlTextDidChange?(notification)
}
#endif
// MARK: Delegate proxy methods
@@ -1200,8 +1200,9 @@
};
C83366DC1AD0293800C668A7 = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = 783T66X79Y;
DevelopmentTeam = 2V65Z4JB29;
LastSwiftMigration = 0800;
ProvisioningStyle = Automatic;
};
C849EF601C3190360048AC4A = {
CreatedOnToolsVersion = 7.2;
@@ -1871,13 +1872,15 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = 783T66X79Y;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2V65Z4JB29;
INFOPLIST_FILE = "RxExample/Info-iOS.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-objc_loadall";
PRODUCT_BUNDLE_IDENTIFIER = io.rx.example.4.3.0;
PRODUCT_NAME = "RxExample-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
};
name = Debug;
@@ -1886,13 +1889,15 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = 783T66X79Y;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2V65Z4JB29;
INFOPLIST_FILE = "RxExample/Info-iOS.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-objc_loadall";
PRODUCT_BUNDLE_IDENTIFIER = io.rx.example.4.3.0;
PRODUCT_NAME = "RxExample-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
};
@@ -2095,13 +2100,15 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = 783T66X79Y;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2V65Z4JB29;
INFOPLIST_FILE = "RxExample/Info-iOS.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-objc_loadall";
PRODUCT_BUNDLE_IDENTIFIER = io.rx.example.4.3.0;
PRODUCT_NAME = "RxExample-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
};
@@ -60,7 +60,13 @@ extension NSTextFieldTests {
fileprivate final class TextFieldDelegate: NSObject, NSTextFieldDelegate {
var didChange = false
#if swift(>=4.2)
func controlTextDidChange(_ notification: Notification) {
didChange = true
}
#else
override func controlTextDidChange(_ notification: Notification) {
didChange = true
}
#endif
}

0 comments on commit c8ad967

Please sign in to comment.