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 ...

Get Xcode 4 iOS Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.