Time for action – binding our Controls using Outlets and Actions

Our final step 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, Introducing Interface Builder.

  1. Once you have created your outlets within the PizzaOrdersViewController.h interface file, it should look something like this. What we are doing here is basically letting our View Controller know what controls we will be dealing with:
    #import <UIKit/UIKit.h> @interface PizzaOrdersViewController : UIViewController { IBOutlet UISwitch *toppingTomato; IBOutlet UISwitch *toppingOnion; IBOutlet UISwitch *toppingCapsicum; IBOutlet UISwitch *toppingOlives; IBOutlet ...

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.