VMF_TapHoldButton
@MainActor
class VMF_TapHoldButton : UIControl
This allows single taps, or hold to repeat (like steppers).
-
The gesture recognizer for single taps.
Declaration
Swift
@MainActor private weak var _tapGestureRecognizer: UITapGestureRecognizer? -
The gesture recognizer for long-press repeat.
Declaration
Swift
@MainActor private weak var _longHoldGestureRecognizer: UILongPressGestureRecognizer? -
This manages the repeated calls.
Declaration
Swift
@MainActor private var _repeater: RVS_BasicGCDTimer? -
The view that contains the button image.
Declaration
Swift
@MainActor private weak var _displayImageView: UIImageView? -
This is how often we repeat, when long-pressing.
Declaration
Swift
@IBInspectable @MainActor var repeatFrequencyInSeconds: TimeInterval -
This is the image that is displayed in the button.
Declaration
Swift
@IBInspectable @MainActor var displayImage: UIImage? { get set }
-
Called for a single tap
Declaration
Swift
@objc @MainActor func tapGesture(_: UITapGestureRecognizer) -
Called for a long-press. The action will be repeated at a regular interval.
Declaration
Swift
@objc @MainActor func longPressGesture(_ inGesture: UILongPressGestureRecognizer)Parameters
inGestureThe gesture recognizer instance.
-
Called when the views are laid out.
We use this to initialize the object.
Declaration
Swift
@MainActor override func layoutSubviews()
View on GitHub