Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 14: Introduction to the AppKit > Making the AppController @interface

Making the AppController @interface

We'll use the Interface Builder application to lay out the window's contents and hook up various connections between AppController and the user interface controls. Interface Builder is also used to lay out iPhone applications, so time in Interface Builder is well spent no matter which platform you'll end up programming for. We'll add stuff to the AppController class, and then Interface Builder will notice our additions and let us build the user interface.

First, we'll set up the header file for AppController:

#import <Cocoa/Cocoa.h>

@interface AppController : NSObject {
  IBOutlet NSTextField *textField;
  IBOutlet NSTextField *resultsField;
}

- (IBAction) uppercase: (id) sender;
- (IBAction) lowercase: (id) sender;

@end // AppController

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial