O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12. Touch Basics

Gestures are everywhere. Tapping buttons, scrolling through lists, zooming images...most interactions with an iPhone or iPad are some sort of gesture. iOS provides lots of user interface elements with built-in gestures, but what if you want more?

That is what UIGestureRecognizer and related classes are for. They enable you to do things like attach a custom swipe or create your own recognizers. Setting up a recognizer can be as easy as writing an action method and making a few connections in Interface Builder (IB).

In this chapter, you add three recognizers to the CarValet app: One uses swipes to move through car details, another takes the iPad app back home, and the last one tracks a finger. First, you learn the basics of gesture ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required