forked from khanhduytran0/FrontBoardAppLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewController.m
32 lines (25 loc) · 1.22 KB
/
ViewController.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
#import "DecoratedAppSceneView.h"
#import "LauncherViewController.h"
#import "ViewController.h"
@interface ViewController ()
@property(nonatomic) FBApplicationProcessLaunchTransaction *transaction;
@property(nonatomic) UIScenePresentationManager *presentationManager;
@end
@implementation ViewController
- (void)loadView {
[super loadView];
//self.view.backgroundColor = UIColor.systemBackgroundColor;
self.title = @"FrontBoardAppLauncher";
LauncherViewController *launcherVC = [LauncherViewController new];
UINavigationController* navigationVC = [[UINavigationController alloc] initWithRootViewController:launcherVC];
navigationVC.modalPresentationStyle = UIModalPresentationCurrentContext;
[self addChildViewController:navigationVC];
DecoratedFloatingView *launcherView = [[DecoratedFloatingView alloc] initWithFrame:CGRectMake(0, 0, 400, 400) navigationBar:navigationVC.navigationBar];
launcherView.center = self.view.center;
launcherView.navigationItem.title = @"FrontBoardAppLauncher";
[launcherView insertSubview:navigationVC.view atIndex:0];
[self.view addSubview:launcherView];
navigationVC.view.frame = launcherView.bounds;
[navigationVC didMoveToParentViewController:self];
}
@end