App delegate navigation controller

This commit is contained in:
Diego Mello 2023-04-06 16:01:36 -03:00
parent 74fbc4e9c0
commit 1d4d5ef29d
1 changed files with 6 additions and 8 deletions

View File

@ -12,14 +12,6 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// UIViewController *rootViewController = [UIViewController new];
// UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController];
// navigationController.navigationBarHidden = YES;
// rootViewController.view = rootView;
// self.window.rootViewController = navigationController;
if(![FIRApp defaultApp]){
[FIRApp configure];
}
@ -35,6 +27,12 @@
self.initialProps = @{};
[super application:application didFinishLaunchingWithOptions:launchOptions];
UIViewController *rootViewController = self.window.rootViewController;
[self.window removeReactSubview:(RCTRootView *)self.window.rootViewController.view];
UINavigationController *navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController];
navigationController.navigationBarHidden = YES;
self.window.rootViewController = navigationController;
[RNBootSplash initWithStoryboard:@"LaunchScreen" rootView:self.window.rootViewController.view];
return YES;