Skip to content

Latest commit

 

History

History
229 lines (147 loc) · 4.95 KB

TouchManager.md

File metadata and controls

229 lines (147 loc) · 4.95 KB
title TouchManager
titleTemplate title - API / NativeScript
description Manage interactivity in your apps easily with TouchManager. Store reusable down/up animation settings for touches as well as optionally enable automatic tap ...
contributors false

Defined in: ui/gestures/touch-manager.ts

Manage interactivity in your apps easily with TouchManager. Store reusable down/up animation settings for touches as well as optionally enable automatic tap (down/up) animations for your app.

Constructors

Constructor

new TouchManager(): TouchManager;

Returns

TouchManager

Properties

animations

static animations: TouchAnimationOptions;

Defined in: ui/gestures/touch-manager.ts

Define reusable touch animations to use on views with touchAnimation defined or with enableGlobalTapAnimations on.


enableGlobalHoverWhereTap

static enableGlobalHoverWhereTap: boolean;

Defined in: ui/gestures/touch-manager.ts

(visionOS Only) Enable hoverStyle for all tap bindings in the UI.


enableGlobalTapAnimations

static enableGlobalTapAnimations: boolean;

Defined in: ui/gestures/touch-manager.ts

Enable animations for all tap bindings in the UI.


touchAnimationDefinitions

static touchAnimationDefinitions: {
  animation: Animation;
  type: TouchAnimationTypes;
  view: View;
}[];

Defined in: ui/gestures/touch-manager.ts

When using NativeScript AnimationDefinition's for touch animations this will contain any instances for finer grain control of starting/stopping under various circumstances. The TouchManager uses this internally but makes public for other versatility if needed.

animation

animation: Animation;

type

type: TouchAnimationTypes;

view

view: View;

touchHandlers

static touchHandlers: {
  handler: any;
  view: View;
}[];

Defined in: ui/gestures/touch-manager.ts

Native Touch handlers (iOS only) registered with the view through the TouchManager. The TouchManager uses this internally but makes public for other versatility if needed.

handler

handler: any;

view

view: View;

visionHoverOptions

static visionHoverOptions: {
[key: string]: VisionHoverOptions;
};

Defined in: ui/gestures/touch-manager.ts

Define reusable hover styles keyed by name to use throughout your UI.

Index Signature

[key: string]: VisionHoverOptions

visionHoverStyleCache

static visionHoverStyleCache: {
[key: string]: UIHoverStyle;
};

Defined in: ui/gestures/touch-manager.ts

Used internally - defines reusable UIHoverStyle's

Index Signature

[key: string]: UIHoverStyle

Methods

addAnimations()

static addAnimations(view: View): void;

Defined in: ui/gestures/touch-manager.ts

The TouchManager uses this internally. Adds touch animations to view based upon it's touchAnimation property or TouchManager.animations.

Parameters

Parameter Type Description
view View NativeScript view instance

Returns

void


addHoverStyle()

static addHoverStyle(view: View): void;

Defined in: ui/gestures/touch-manager.ts

The TouchManager uses this internally. Adds visionOS hover styles to views based upon it's visionHoverStyle property

Parameters

Parameter Type Description
view View NativeScript view instance

Returns

void


startAnimationForType()

static startAnimationForType(view: View, type: TouchAnimationTypes): void;

Defined in: ui/gestures/touch-manager.ts

Parameters

Parameter Type
view View
type TouchAnimationTypes

Returns

void