-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCDGAppDelegate.m
37 lines (30 loc) · 872 Bytes
/
CDGAppDelegate.m
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
#import "CDGAppDelegate.h"
#import "CDGViewController.h"
@implementation CDGAppDelegate
- (id)init
{
self = [super init];
if (self) {
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_navigationController = [[UINavigationController alloc] init];
_viewController = [[CDGViewController alloc] initWithStyle:UITableViewStylePlain];
}
return self;
}
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
if ([_window respondsToSelector:@selector(setRootViewController:)])
[_window setRootViewController:_navigationController];
else
[_window addSubview:[_navigationController view]];
[_navigationController pushViewController:_viewController animated:NO];
[_window makeKeyAndVisible];
}
- (void)dealloc
{
[_viewController release];
[_navigationController release];
[_window release];
[super dealloc];
}
@end