Xcode 3.2.1, Interface Builder and Outlets

First day of iPhone development and I've already hit a problem.  Using the Stanford iPhone Application Development course as a crash course the first lecture had a demo application  using a program called "Interface Builder" to hook together a bunch of pieces for a basic UI.  Well the most important part, hooking the pieces together, changed with version 3.2.  Rather than creating the outlets from the interface they must be added explicitly to the header file.

For completeness, here is the code which needs to be added (it was difficult to read from the video)

@interface MyController : NSObject {
IBOutlet UILabel *label;
IBOutlet UISlider *slider;


int value = slider.value;
label.text = [NSString stringWithFormat: @"%d", value];


  1. thanks. kept trying to pinch and zoom on my phones screen with no luck

  2. Also, I created those outlets from the interface builder, its just in a different window. His demo showed it in the inspector. In the latest IB, it's in the Library window (selected classes from the Objects|Classes|Media selector, pick your controller, bottom half).

  3. Thanks for the tip, I looked all over the place trying to find how to create an outlet in IB.


Post a Comment

Popular posts from this blog

Decommissioning the cloud: A self-hosted future

Taking Stuff Apart: Realistic Modulette-8

Using a JFileChooser to browse AWS S3