-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathYLBHomeModule.m
More file actions
39 lines (34 loc) · 1.19 KB
/
Copy pathYLBHomeModule.m
File metadata and controls
39 lines (34 loc) · 1.19 KB
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
//
// YLBHomeModule.m
// YLBModule_Example
//
// Created by yulibo on 2020/3/12.
// Copyright © 2020 余礼钵. All rights reserved.
//
#import "YLBHomeModule.h"
#import <YLBModuleManager.h>
#import <YLBServiceManager.h>
#import "YLBHomeController.h"
@interface YLBHomeModule ()<YLBModuleProtocol>
//@property (strong, nonatomic) UIWindow *window;
@end
@implementation YLBHomeModule
+ (void)load {
[[YLBModuleManager sharedInstance] registerModuleClass:[self class]];
}
- (NSInteger)ylb_modulePriority {
[[YLBServiceManager sharedInstance] registerService:NSProtocolFromString(@"YLBHomeProtocol") implClass:[YLBHomeController class]];
return 2000;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
YLBHomeController *vc = [YLBHomeController new];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
UIWindow *window = [YLBModuleManager sharedInstance].delegate.window;
window.rootViewController = nav;
return YES;
}
//- (UIWindow *)window {
//// return [[YLBModuleManager sharedInstance] window];
// return [YLBModuleManager sharedInstance].delegate.window;
//}
@end