Graphics Programs Reference
In-Depth Information
Thus, an outlet connection in a XIB file is equivalent to sending the object with the outlet
a setter message based on the name of the outlet. For example, setting the
view
outlet of
an object will send the message
setView:
to that object when the XIB file is loaded.
The argument to this method is the object on other end of the connection.
Let's test this out. Open
HypnoAppDelegate.m
, create an instance of
TimeViewController
, and set it as the
rootViewController
of the window.
Make sure to import
TimeViewController.h
.
#import "HypnoAppDelegate.h"
#import "HypnosisViewController.h"
#import "TimeViewController.h"
@implementation HypnoAppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
// Now that we aren't using hvc, this line will generate a warning - ignore it
HypnosisViewController *hvc = [[HypnosisViewController alloc] init];