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 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, Working with the Interface Builder:

  1. Once you have created your outlets within your SwitchesSlidersSegmentsViewController.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 SwitchesSlidersSegmentsViewController : UIViewController { IBOutlet UISegmentedControl *colorChoice; IBOutlet UISwitch *toggleSwitch; IBOutlet UIWebView *ourWebView; IBOutlet ...

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