O'Reilly logo

iOS App Development Portable Genius by Richard Wentk

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

Understanding User Interaction

Typically, a user taps on the screen to make something happen in an app, and the app responds by updating the content of the screen. It may also perform other tasks, such as downloading data from the Internet, getting the current device location, and so on.

Interaction is usually manual, but it can also be automated with timers, delayed messages, and other scheduled events. In this chapter, we’ll look at manual interaction—capturing and processing events generated by a user.

Introducing actions, outlets, and responder events

iOS includes three systems for dealing with manual interaction:

bullet_2c.tif Actions send messages to objects in your code. Action messages can be created by onscreen controls and by external events.

bullet_2c.tif Outlets control the properties of onscreen objects. You can use properties to change the appearance and content of objects on the screen as your app runs.

bullet_2c.tif The responder system sends messages to objects that volunteer to receive them.

Let’s look at what this means in practice.

Working with actions, outlets, and responder events

In an app, you typically design a UI with a number of controls—buttons, sliders, text boxes, and so on—and then connect

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