O'Reilly logo

iPhone Programming: The Big Nerd Ranch Guide by Joe Conway, Aaron Hillegass

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

17. Multi-Touch, UIResponder, and Using Instruments

In Chapter 6, you created a UIScrollView that dealt with multi-touch events to translate and scale your view. You have also used UIControl, when you set a target/action pair to be triggered for certain types of events. What if you want to do something else, something special or unique, with touch events?

In this chapter, your are going to create a view that lets the user draw lines by dragging across the view (Figure 17.1). Using multi-touch, the user will be able to draw more than one line at a time. Double-tapping will clear the screen and allow the user to begin again.

Figure 17.1. A drawing program

Touch Events

A UITouch object represents one finger touching the screen. Because you can ...

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