πŸš€ 8.9 Released! β†’ ⚑️ New Node-API Engine Preview, πŸ“² ns widget ios, πŸ’… Tailwind v4 and more...
Read Announcement
TouchManager
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.

Summary ​

Constructors ​

constructor ​

new TouchManager(): TouchManager 
Returns TouchManager

Properties ​

animations ​

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

enableGlobalTapAnimations ​

Static
enableGlobalTapAnimations: boolean
Enable animations for all tap bindings in the UI.

touchAnimationDefinitions ​

Static
touchAnimationDefinitions: {
animation: Animation;
type: TouchAnimationTypes;
}[]
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.

touchHandlers ​

Static
touchHandlers: {
handler: any
}[]
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.

Methods ​

addAnimations ​

Static
addAnimations(view: View): void
The TouchManager uses this internally. Adds touch animations to view based upon it's touchAnimation property or TouchManager.animations.
Parameter Default Description
view

NativeScript view instance

Returns void

startAnimationForType ​

Static
startAnimationForType(view: View, type: TouchAnimationTypes): void
Parameter Default Description
view
type
TouchAnimationTypes
Returns void
Previous
TimePicker

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /