O'Reilly logo

iPhone® Application Development For Dummies®, 4th Edition by Neal Goldstein

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

Chapter 6

Adding Outlets and Actions to Your RoadTrip Code

In This Chapter

arrow Connecting your user interface to your code

arrow Using the Assistant

arrow Taking advantage of the Connections inspector

arrow Understanding how connections are made at runtime

When you write your own code, it is pretty obvious how a program works. For example, you create an object, initialize it, and then send it messages.

When you work with storyboards, however, how your program works may not be so obvious. How do you go from the objects you added to your user interface in Interface Builder to code that enables you to access these objects (such as to an Image view to change its image) or receive a message that the user has tapped a button?

The objects in your user interface must communicate with each other and with your source code if your program is to allow the user to interact with it. To access a user interface object and to specify which messages are sent and received, you use Interface Builder to create connections. There are two basic types of connections you can create:

Outlet connections, which connect your code ...

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