O'Reilly logo

Xcode 4 iOS Development by Steven F. Daniel

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

Time for action – binding our Controls using Outlets and Actions

Our final steps will be to bind our control objects to our View Controller and connecting these via outlets and actions. We covered this in the section Making our Components work together in Chapter 3, Working with the Interface Builder:

  1. Create the necessary outlets within your CustomPickersViewController.h interface file. Once you have done this, it should look something like this. You will notice that we have additional classes of our UIViewController class; this is why we had to link our UIPickerView up to our Datasource and Delegate objects. We are also creating two array objects which will hold our animal types and the noises that they make:
    #import <UIKit/UIKit.h> @interface ...

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