blob: 53e7f6188bd08c7a225f4e5e0f9d862e9bd59de0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#import "AppDelegate.h"
#import "NRViewController.h"
@interface AppDelegate ()
@property (nonatomic, retain) NRViewController *viewController;
@end
@implementation AppDelegate
@synthesize viewController = _viewController;
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc]
initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.viewController = [[NRViewController new] autorelease];
if ([self.window respondsToSelector:@selector(setRootViewController:)])
self.window.rootViewController = self.viewController;
else
[self.window addSubview:self.viewController.view];
[self.window makeKeyAndVisible];
return YES;
}
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
@end
|