Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLTouchManager Class Reference

Section Contents

Overview

Undocumented

touchEventDelegate

Notified of processed touches such as pinches, pans, and taps

Objective-C

@property (readwrite, nonatomic, nullable) id<SDLTouchManagerDelegate>
    touchEventDelegate;

touchEventHandler

@abstract Returns all OnTouchEvent notifications as SDLTouch and SDLTouchType objects.

Objective-C

@property (readwrite, copy, nonatomic, nullable)
    SDLTouchEventHandler touchEventHandler;

Swift

var touchEventHandler: SDLTouchEventHandler? { get set }

tapDistanceThreshold

Distance between two taps on the screen, in the head unit’s coordinate system, used for registering double-tap callbacks.

Note

Defaults to 50 px.

Objective-C

@property (assign, readwrite, nonatomic) CGFloat tapDistanceThreshold;

Swift

var tapDistanceThreshold: CGFloat { get set }

panDistanceThreshold

Minimum distance for a pan gesture in the head unit’s coordinate system, used for registering pan callbacks.

Note

Defaults to 8 px.

Objective-C

@property (assign, readwrite, nonatomic) CGFloat panDistanceThreshold;

Swift

var panDistanceThreshold: CGFloat { get set }

tapTimeThreshold

@abstract Time (in seconds) between tap events to register a double-tap callback. @remark Default is 0.4 seconds.

Objective-C

@property (assign, readwrite, nonatomic) CGFloat tapTimeThreshold;

Swift

var tapTimeThreshold: CGFloat { get set }

movementTimeThreshold

@abstract Time (in seconds) between movement events to register panning or pinching callbacks. @remark Default is 0.05 seconds.

Objective-C

@property (assign, readwrite, nonatomic) CGFloat movementTimeThreshold;

Swift

var movementTimeThreshold: CGFloat { get set }

enableSyncedPanning

If set to NO, the display link syncing will be ignored and movementTimeThreshold will be used. Defaults to YES.

Objective-C

@property (assign, readwrite, nonatomic) BOOL enableSyncedPanning;

Swift

var enableSyncedPanning: Bool { get set }

touchEnabled

@abstract Boolean denoting whether or not the touch manager should deliver touch event callbacks. @remark Default is true.

Objective-C

@property (getter=isTouchEnabled, assign, readwrite, nonatomic)
    BOOL touchEnabled;

Swift

var isTouchEnabled: Bool { get set }

-cancelPendingTouches

@abstract Cancels pending touch event timers that may be in progress. @remark Currently only impacts the timer used to register single taps.

Objective-C

- (void)cancelPendingTouches;

Swift

func cancelPendingTouches()

-init

Undocumented

Objective-C

- (instancetype)init NS_UNAVAILABLE;

-initWithHitTester:

Initialize a touch manager with a hit tester if available

Objective-C

- (nonnull instancetype)initWithHitTester:
    (nullable id<SDLFocusableItemHitTester>)hitTester;

Parameters

hitTester

The hit tester to be used to correlate a point with a view

Return Value

The initialized touch manager

-syncFrame

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.

Objective-C

- (void)syncFrame;

Swift

func syncFrame()
View on GitHub.com
Previous Section Next Section