Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Wire the Start and Stop Buttons

Now you’re ready to add your Start and Stop push buttons and wire them up in your MainMenu.nib window.

  1. Control-drag each of the Start and Stop buttons from the window to the MyRecorderController object, as shown in Figure 2-14. Click the startRecording: method in the transparent Received Actions panel to connect the Start button, and likewise, the stopRecording: method in the Received Actions panel to connect the Stop button.


    Figure 2-14  Wiring the recording buttons to the MyRecorderController object

    Wiring the recording buttons to the MyRecorderController object
  2. Now you’ll need to hook up the window and the MyRecorderController object as a delegate, shown in Figure 2-15. Control-drag a connection from the window to the MyRecorderController object and click the outlet, connecting the two objects.


    Figure 2-15  Connecting the window to the MyRecorderController object as the delegate outlet

    Connecting the window to the MyRecorderController object as the delegate outlet
  3. To verify that you’ve correctly wired up your window object to your delegate object, select the Window and click the Window Connections Inspector icon, shown in Figure 2-16.


    Figure 2-16  The window object wired up correctly to the delegate object

    The window object wired up correctly to the delegate object
  4. Verify that you’ve correctly wired up your outlets and received actions. Select the My Recorder Controller object and click the My Recorder Controller Connections Inspector icon, shown in Figure 2-17.


    Figure 2-17  My Recorder controller object and buttons wired up correctly

    My Recorder controller object and buttons wired up correctly
  5. Check the My Recorder Controller Identity Inspector panel to confirm the class actions and class outlets, shown in Figure 2-18.


    Figure 2-18  Class actions and outlets specified in the identity inspector

    Class actions and outlets specified in the identity inspector
  6. Click the MainMenu.nib file to verify that Interface Builder and Xcode have worked together to synchronize the actions and outlets you’ve specified. A small green light appears at the left bottom corner of the MainMenu.nib file next to MyRecorder.xcodeproj to confirm this synchronization, as shown in Figure 2-19.


    Figure 2-19  The green light indicating synchronization between Xcode and Interface Builder

    The green light indicating synchronization between Xcode and Interface Builder
  7. Save your nib file.

  8. Verify that your QTKit MyRecorder capture application appears as shown in Figure 2-20.


    Figure 2-20  The completed user interface for the MyRecorder application

    The completed user interface for the MyRecorder application

You’ve now completed your work in Interface Builder 3. In this next sequence of steps, you’ll return to your Xcode project, adding a few lines of code in both your declaration and implemention files to build and compile the QTKit capture player application.



< Previous PageNext Page > Hide TOC


Last updated: 2007-10-31




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice