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.

Adding the Initial Add/View Behaviors

Every UI element you add to your app must show or do something relevant. Yes, some elements—such as the divider view and decorative images—serve other purposes. These decorations are useful only when used with items that show information, allow action, or show results of an action.

The interface you are working on now displays the total number of cars, the index of the car shown, and its detailed information. It also provides actions: creating a car and going to the next or previous car. Before you can create the code to respond to buttons or update labels, you need a way to know when the button is touched. You also need references to any labels you will change.

IBAction and IBOutlet

You use IB to add behaviors ...

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