Skip to Content
UX Design for Mobile
book

UX Design for Mobile

by Pau Giner, Pablo Perea
July 2017
Intermediate to advanced
354 pages
9h 58m
English
Packt Publishing
Content preview from UX Design for Mobile

Events

Events allow us to give interactivity to our prototypes. You can associate functionality as a reaction to a given event. There are many kinds of events; for example, when the user interacts with an interface element or when an animation starts or ends.

In the following example, we will print the tap count number each time the user taps on it:

numberOfTaps = 0numberOfTapsLayer = new Layer    backgroundColor: "#123123"numberOfTapsLayer.center()numberOfTapsLayer.on Events.Tap, ->    numberOfTaps++    print numberOfTaps
Download prototype from Asset_A6462_A08_A13_Example_NumberOfTapsLayer.framer.zip.

As you can see, we used the Events.Tap event, but we can listen to other events as Swipe, LongPress, Pinch or the ForceTap. You can also use some ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical UX Design

Practical UX Design

Scott Faranello
Designing UX: Forms

Designing UX: Forms

Jessica Enders
User Experience Design

User Experience Design

Satyam Kantamneni

Publisher Resources

ISBN: 9781787283428Supplemental Content