Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning iOS UI Development

You're reading from   Learning iOS UI Development Implement complex iOS user interfaces with ease using Swift

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785288197
Length 196 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Gestures and gesture recognizers


Within the methods previously shown, you can perform complex operations and even programmatically filter the touch actions you want to handle, starting from the analysis of UITouch objects. Just to give you an example, you might be able to define that if the touch is constantly moving to the left of the screen in a considerable short amount of time, the user is performing a swipe left action. Identifying multitouch sequences as specific actions using only the UIResponder functions is not trivial, though—especially when it comes to multitouch sequences.

Luckily enough, iOS comes with a number of preset actions that we more appropriately call gestures. A gesture is a way to turn a touch sequence into a specific pattern thanks to algorithms that convert finger movements under the hood into a single specific action.

The set of gestures handled by iOS is somewhat small, but it includes most of the relevant movements you may need for your applications. Here they...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime