Skip to content

Commit

Permalink
Fix carthage support
Browse files Browse the repository at this point in the history
  • Loading branch information
jegnux committed Mar 23, 2021
1 parent 54af729 commit 3d8aae5
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 57 deletions.
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "6.0.0"
github "ReactiveX/RxSwift" "6.1.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/RxSwift
Submodule RxSwift updated 561 files
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
RxCocoa: 3f79328fafa3645b34600f37c31e64c73ae3a80e
RxGesture: 11c8959d9161deb7da24a12e91f3ebdf40256747
RxGesture: b095a86df33d199a33b46a644e7c58bdef8ab035
RxRelay: 8d593be109c06ea850df027351beba614b012ffb
RxSwift: c14e798c59b9f6e9a2df8fd235602e85cc044295

PODFILE CHECKSUM: d48d39de6335e342c666df2ee12e4efb3d005eb3

COCOAPODS: 1.10.0
COCOAPODS: 1.10.1
4 changes: 2 additions & 2 deletions Pod/Classes/GenericRxGestureRecognizerDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public struct GestureRecognizerDelegatePolicy<PolicyInput> {
}

public func || <PolicyInput>(lhs: GestureRecognizerDelegatePolicy<PolicyInput>, rhs: GestureRecognizerDelegatePolicy<PolicyInput>) -> GestureRecognizerDelegatePolicy<PolicyInput> {
return .custom { input in
.custom { input in
lhs.isPolicyPassing(with: input) || rhs.isPolicyPassing(with: input)
}
}

public func && <PolicyInput>(lhs: GestureRecognizerDelegatePolicy<PolicyInput>, rhs: GestureRecognizerDelegatePolicy<PolicyInput>) -> GestureRecognizerDelegatePolicy<PolicyInput> {
return .custom { input in
.custom { input in
lhs.isPolicyPassing(with: input) && rhs.isPolicyPassing(with: input)
}
}
Expand Down
12 changes: 6 additions & 6 deletions Pod/Classes/iOS/ForceTouchGestureRecognizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public class ForceTouchGestureRecognizer: UIGestureRecognizer {

private var touch: UITouch?
public var force: CGFloat {
return touch?.force ?? 0
touch?.force ?? 0
}

public var maximumPossibleForce: CGFloat {
return touch?.maximumPossibleForce ?? 0
touch?.maximumPossibleForce ?? 0
}

public var absoluteFractionCompleted: CGFloat {
Expand All @@ -26,7 +26,7 @@ public class ForceTouchGestureRecognizer: UIGestureRecognizer {
public var maximumFractionCompletedRequired: CGFloat = 1

public var fractionCompleted: CGFloat {
return lerp(
lerp(
mapMin: minimumFractionCompletedRequired, to: 0,
mapMax: maximumFractionCompletedRequired, to: 1,
value: absoluteFractionCompleted
Expand Down Expand Up @@ -104,7 +104,7 @@ extension ObservableType where Element: ForceTouchGestureRecognizer {
return source
.when(.began)
.flatMapLatest { [unowned source] _ in
return source
source
.when(.changed)
.filter {
if threshold == 0 {
Expand All @@ -119,11 +119,11 @@ extension ObservableType where Element: ForceTouchGestureRecognizer {
}

private func lerp<T : FloatingPoint>(_ v0: T, _ v1: T, _ t: T) -> T {
return v0 + (v1 - v0) * t
v0 + (v1 - v0) * t
}

private func lerp<T : FloatingPoint>(mapMin: T, to min: T, mapMax: T, to max: T, value: T) -> T {
return lerp(min, max, (value - mapMin) / (mapMax - mapMin))
lerp(min, max, (value - mapMin) / (mapMax - mapMin))
}

#endif
115 changes: 71 additions & 44 deletions RxGesture/RxGesture.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if ! command -v carthage > /dev/null; then
exit 1
fi

carthage update --use-submodules --no-use-binaries
carthage update --use-xcframeworks --use-submodules --no-use-binaries

0 comments on commit 3d8aae5

Please sign in to comment.