forked from 3lvis/DATAStack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.m
37 lines (23 loc) · 948 Bytes
/
AppDelegate.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 "AppDelegate.h"
#import "ViewController.h"
#import "DemoObjectiveC-Swift.h"
@interface AppDelegate ()
@property (nonatomic) DATAStack *dataStack;
@end
@implementation AppDelegate
#pragma mark - Getters
- (DATAStack *)dataStack {
if (_dataStack) return _dataStack;
_dataStack = [[DATAStack alloc] initWithModelName:@"DemoObjectiveC"];
return _dataStack;
}
#pragma mark - UIApplicationDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
ViewController *mainController = [[ViewController alloc] initWithDataStack:self.dataStack];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:mainController];
self.window.rootViewController = navController;
[self.window makeKeyAndVisible];
return YES;
}
@end