diff --git a/Sources/OctopusKit/Apple API Extensions/OSAgnosticTypeAliases.swift b/Sources/OctopusKit/Apple API Extensions/OSAgnosticTypeAliases.swift index b4fcbb73..4a3a5dea 100644 --- a/Sources/OctopusKit/Apple API Extensions/OSAgnosticTypeAliases.swift +++ b/Sources/OctopusKit/Apple API Extensions/OSAgnosticTypeAliases.swift @@ -45,6 +45,11 @@ public typealias OSClickOrTapGestureRecognizer = UITapGestureRecognizer public typealias OSPanGestureRecognizer = UIPanGestureRecognizer public typealias OSMouseOrTouchEventComponent = TouchEventComponent -public typealias OSClickOrTapGestureRecognizerComponent = TapGestureRecognizerComponent + +#endif + +#if os(iOS) + +public typealias OSClickOrTapGestureRecognizerComponent = TapGestureRecognizerComponent // Not available on tvOS #endif diff --git a/Sources/OctopusKit/Components/Input/Touch Gestures/PanGestureRecognizerComponent.swift b/Sources/OctopusKit/Components/Input/Touch Gestures/PanGestureRecognizerComponent.swift index df4238a7..3952e310 100644 --- a/Sources/OctopusKit/Components/Input/Touch Gestures/PanGestureRecognizerComponent.swift +++ b/Sources/OctopusKit/Components/Input/Touch Gestures/PanGestureRecognizerComponent.swift @@ -30,14 +30,14 @@ public final class PanGestureRecognizerComponent: OctopusGestureRecognizerCompon super.init() self.gestureRecognizer.delegate = self - #if canImport(AppKit) - self.compatibleGestureRecognizerTypes = [NSMagnificationGestureRecognizer.self] - #elseif canImport(UIKit) + #if os(iOS) self.compatibleGestureRecognizerTypes = [UIPinchGestureRecognizer.self] + #elseif os(macOS) + self.compatibleGestureRecognizerTypes = [NSMagnificationGestureRecognizer.self] #endif } - #if canImport(UIKit) // MARK: - iOS + #if os(iOS) // MARK: - iOS /// - NOTE: Unless specified, `maximumNumberOfTouches` will be set equal to `minimumNumberOfTouches`. public convenience init(minimumNumberOfTouches: Int = 1, @@ -52,7 +52,7 @@ public final class PanGestureRecognizerComponent: OctopusGestureRecognizerCompon #endif - #if canImport(AppKit) // MARK: - macOS + #if os(macOS) // MARK: - macOS public convenience init(buttonMask: Int = 0x1, numberOfTouchesRequired: Int = 1)