1.0.13 • Published 3 years ago

@oliverphaser/nativescript-eventify v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm apple android support

NativeScript Eventify

NativeScript has a method called notify you can use to notify an observable of changes. But you can't use it to trigger events like tap or swipe, enter NativeScript Eventify.

NativeScript 8

This will work only on NativeScript 8.

Supported Events

  • tap

Roadmap

  • Add support for doubleTap events
  • Add support for longPress events
  • Add support for swipe events
  • Add support for pan events
  • Add support for pinch events
  • Add support for rotate events
  • Add support for touch events

Installation

ns plugin add @oliverphaser/nativescript-eventify

Usage

Just require it once.

//app.js
require("@oliverphaser/nativescript-eventify");
/**
* home-page.js
*
* Assume the view already has the event listner(s) setup.
*/

// Simulates a tap event
view.eventify({ eventName: "tap", object: view });

Take a look at this Playground for a working example.

API

PropertiesRequiredDescription
EventDataYesThe eventName and object, just like using notify.
InfoSometimesSome of the events (i.e. swipe) will need extra information

Info

EventRequiredPropertiesDescription
tapNon/an/a
1.0.11

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago