You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TactileSlider/Classes/TactileSlider.swift
+60-6Lines changed: 60 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -78,8 +78,43 @@ import UIKit
78
78
79
79
/// If true, a single tap anywhere in the slider will set it to that value
80
80
///
81
-
/// - Remark: Users may accidentally activate this feature while trying to make very small adjustments. If the intended use case involves making very small adjustments with the slider, consider disabling this feature.
82
-
@IBInspectableopenvarenableTapping:Bool=true
81
+
/// On iOS 9 or later, direct taps or indirect (trackpad or mouse) clicks can be specified using the `allowedTapTypes` property.
82
+
///
83
+
/// - Remark: Users may accidentally activate this feature while trying to make very small adjustments. If the intended use case involves making very small, precise adjustments with the slider, consider disabling this feature or restricting it to indirect touches only using `allowedTapTypes`.
84
+
@IBInspectableopenvarenableTapping:Bool=true{
85
+
didSet {
86
+
setTapEnabled()
87
+
}
88
+
}
89
+
90
+
/// An array of `UITouch.TouchType`s used to distinguish the type of touches for the `enableTapping` feature.
91
+
///
92
+
/// This is a wrapper around the [UITapGestureRecognizer](https://developer.apple.com/documentation/uikit/uigesturerecognizer)'s [allowedTouchTypes](https://developer.apple.com/documentation/uikit/uigesturerecognizer/1624223-allowedtouchtypes) property.
93
+
///
94
+
/// If `enableTapping` is `true`, this can be used to filter direct (e.g. finger) or indirect (e.g. trackpad) touches.
95
+
///
96
+
/// - Requires: iOS 9
97
+
/// - Requires: `enableTapping == true`, otherwise no effect
0 commit comments