diff --git a/Carthage/Checkouts/RxSwift b/Carthage/Checkouts/RxSwift index cce95dd..97e1435 160000 --- a/Carthage/Checkouts/RxSwift +++ b/Carthage/Checkouts/RxSwift @@ -1 +1 @@ -Subproject commit cce95dd704bc08cd3d69c087a05a6fc3118e2722 +Subproject commit 97e14358a3e6564de8a6289362385a92d85936e1 diff --git a/Pod/Classes/GestureRecognizer+RxGesture.swift b/Pod/Classes/GestureRecognizer+RxGesture.swift index 0228a50..ae274c8 100644 --- a/Pod/Classes/GestureRecognizer+RxGesture.swift +++ b/Pod/Classes/GestureRecognizer+RxGesture.swift @@ -21,7 +21,7 @@ import RxSwift import RxCocoa -extension ObservableType where E: GestureRecognizer { +extension ObservableType where Element: GestureRecognizer { /** Filters the observable `GestureRecognizer` events sequence based on the `GestureRecognizer` state. @@ -29,7 +29,7 @@ extension ObservableType where E: GestureRecognizer { - parameter state: An `GestureRecognizerState` that is used to filter the `GestureRecognizer` events sequence. - returns: An observable `GestureRecognizer` events sequence that only contains events emitted while the `GestureRecognizer`'s state match the given `state`. */ - public func when(_ states: GestureRecognizerState...) -> Observable { + public func when(_ states: GestureRecognizerState...) -> Observable { return filter { gesture in return states.contains(gesture.state) } @@ -41,7 +41,7 @@ extension ObservableType where E: GestureRecognizer { - parameter state: An `GestureRecognizerState` that is used to filter the `GestureRecognizer` events sequence. - returns: An observable `GestureRecognizer` events sequence that only contains events emitted while the `GestureRecognizer`'s state match the given `state`. */ - internal func when(_ states: [GestureRecognizerState]) -> Observable { + internal func when(_ states: [GestureRecognizerState]) -> Observable { return filter { gesture in return states.contains(gesture.state) } diff --git a/Pod/Classes/View+RxGesture.swift b/Pod/Classes/View+RxGesture.swift index f6c231b..4ab57db 100644 --- a/Pod/Classes/View+RxGesture.swift +++ b/Pod/Classes/View+RxGesture.swift @@ -102,7 +102,7 @@ extension Reactive where Base: View { guard let gesture = gesture else { return } control?.removeGestureRecognizer(gesture) }) - .takeUntil(control.rx.deallocated) + .take(until: control.rx.deallocated) } return ControlEvent(events: source) diff --git a/Pod/Classes/iOS/ForceTouchGestureRecognizer.swift b/Pod/Classes/iOS/ForceTouchGestureRecognizer.swift index c247903..da827f3 100644 --- a/Pod/Classes/iOS/ForceTouchGestureRecognizer.swift +++ b/Pod/Classes/iOS/ForceTouchGestureRecognizer.swift @@ -82,7 +82,7 @@ extension Reactive where Base: View { } @available(iOS 9.0, *) -extension ObservableType where E: ForceTouchGestureRecognizer { +extension ObservableType where Element: ForceTouchGestureRecognizer { /** Maps the observable `GestureRecognizer` events sequence to an observable sequence of force values. diff --git a/Pod/Classes/iOS/TouchDownGestureRecognizer.swift b/Pod/Classes/iOS/TouchDownGestureRecognizer.swift index 43bc881..748f4e1 100644 --- a/Pod/Classes/iOS/TouchDownGestureRecognizer.swift +++ b/Pod/Classes/iOS/TouchDownGestureRecognizer.swift @@ -79,7 +79,7 @@ extension Reactive where Base: View { } } -extension ObservableType where E: TouchDownGestureRecognizer { +extension ObservableType where Element: TouchDownGestureRecognizer { /** Maps the observable `GestureRecognizer` events sequence to an observable sequence of force values. diff --git a/Pod/Classes/iOS/TransformGestureRecognizers.swift b/Pod/Classes/iOS/TransformGestureRecognizers.swift index cdbed6d..4898445 100644 --- a/Pod/Classes/iOS/TransformGestureRecognizers.swift +++ b/Pod/Classes/iOS/TransformGestureRecognizers.swift @@ -55,9 +55,9 @@ extension Reactive where Base: View { } } -extension ObservableType where E == TransformGestureRecognizers { +extension ObservableType where Element == TransformGestureRecognizers { - public func when(_ states: GestureRecognizerState...) -> Observable { + public func when(_ states: GestureRecognizerState...) -> Observable { return filter { gestures in return states.contains(gestures.panGesture.state) || states.contains(gestures.rotationGesture.state) diff --git a/Pod/Classes/iOS/UIPanGestureRecognizer+RxGesture.swift b/Pod/Classes/iOS/UIPanGestureRecognizer+RxGesture.swift index 957f8ce..1ea273b 100644 --- a/Pod/Classes/iOS/UIPanGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/iOS/UIPanGestureRecognizer+RxGesture.swift @@ -48,7 +48,7 @@ extension Reactive where Base: View { } } -extension ObservableType where E: UIPanGestureRecognizer { +extension ObservableType where Element: UIPanGestureRecognizer { /** Maps the observable `GestureRecognizer` events sequence to an observable sequence of translation values of the pan gesture in the coordinate system of the specified `view` alongside the gesture velocity. diff --git a/Pod/Classes/iOS/UIPinchGestureRecognizer+RxGesture.swift b/Pod/Classes/iOS/UIPinchGestureRecognizer+RxGesture.swift index 946d1dd..6e58d59 100644 --- a/Pod/Classes/iOS/UIPinchGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/iOS/UIPinchGestureRecognizer+RxGesture.swift @@ -48,7 +48,7 @@ extension Reactive where Base: View { } } -extension ObservableType where E: UIPinchGestureRecognizer { +extension ObservableType where Element: UIPinchGestureRecognizer { /** Maps the observable `GestureRecognizer` events sequence to an observable sequence of scale factors relative to the points of the two touches in screen coordinates alongside the gesture velocity. diff --git a/Pod/Classes/iOS/UIRotationGestureRecognizer+RxGesture.swift b/Pod/Classes/iOS/UIRotationGestureRecognizer+RxGesture.swift index 25f7aa9..3c60020 100644 --- a/Pod/Classes/iOS/UIRotationGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/iOS/UIRotationGestureRecognizer+RxGesture.swift @@ -48,7 +48,7 @@ extension Reactive where Base: View { } } -extension ObservableType where E: UIRotationGestureRecognizer { +extension ObservableType where Element: UIRotationGestureRecognizer { /** Maps the observable `GestureRecognizer` events sequence to an observable sequence of rotation values of the gesture in radians alongside the gesture velocity. diff --git a/RxGesture/RxGesture.xcodeproj/project.pbxproj b/RxGesture/RxGesture.xcodeproj/project.pbxproj index 48345af..7f87b75 100644 --- a/RxGesture/RxGesture.xcodeproj/project.pbxproj +++ b/RxGesture/RxGesture.xcodeproj/project.pbxproj @@ -335,6 +335,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = F4CC4C131DEBA895009ED835; @@ -600,7 +601,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -655,7 +656,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic";