Touch Manager responsible for processing touch event notifications.
Notified of processed touches such as pinches, pans, and taps
@property (nonatomic, weak, nullable) id<SDLTouchManagerDelegate> touchEventDelegate;
Returns all OnTouchEvent notifications as SDLTouch and SDLTouchType objects.
@property (nonatomic, copy, nullable) SDLTouchEventHandler touchEventHandler;
var touchEventHandler: SDLTouchEventHandler? { get set }
Distance between two taps on the screen, in the head unit’s coordinate system, used for registering double-tap callbacks.
Defaults to 50 px.
@property (nonatomic) CGFloat tapDistanceThreshold;
var tapDistanceThreshold: CGFloat { get set }
Minimum distance for a pan gesture in the head unit’s coordinate system, used for registering pan callbacks.
Defaults to 8 px.
@property (nonatomic) CGFloat panDistanceThreshold;
var panDistanceThreshold: CGFloat { get set }
Time (in seconds) between tap events to register a double-tap callback. This must be greater than 0.0.
Default is 0.4 seconds.
@property (nonatomic) CGFloat tapTimeThreshold;
var tapTimeThreshold: CGFloat { get set }
If set to NO, the display link syncing will be ignored. Defaults to YES.
@property (nonatomic) BOOL enableSyncedPanning;
var enableSyncedPanning: Bool { get set }
Boolean denoting whether or not the touch manager should deliver touch event callbacks.
Default is true.
@property (nonatomic, assign, unsafe_unretained, readwrite,
getter=isTouchEnabled) BOOL touchEnabled;
var isTouchEnabled: Bool { get set }
Cancels pending touch event timers that may be in progress.
Currently only impacts the timer used to register single taps.
- (void)cancelPendingTouches;
func cancelPendingTouches()
Initializer unavailable
- (nonnull instancetype)init;
Initialize a touch manager with a hit tester and a video scale manager.
- (nonnull instancetype)
initWithHitTester:(nullable id<SDLFocusableItemHitTester>)hitTester
videoScaleManager:
(nonnull SDLStreamingVideoScaleManager *)videoScaleManager;
The hit tester to be used to correlate a point with a view
The scale manager that scales from the display screen coordinate system to the app’s viewport coordinate system
The initialized touch manager
Called by SDLStreamingMediaManager in sync with the streaming framerate. This helps to moderate panning gestures by allowing the UI to be modified in time with the framerate.
- (void)syncFrame;
func syncFrame()