-
-
Save brentvatne/7bd791e9a4fdcea54cc7d2b771966cc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ios/example/AppDelegate.m b/ios/example/AppDelegate.m | |
index 1b72e8c..3ddedd1 100644 | |
--- a/ios/example/AppDelegate.m | |
+++ b/ios/example/AppDelegate.m | |
@@ -33,17 +33,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( | |
InitializeFlipper(application); | |
#endif | |
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; | |
- RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil]; | |
- id rootViewBackgroundColor = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RCTRootViewBackgroundColor"]; | |
- if (rootViewBackgroundColor != nil) { | |
- rootView.backgroundColor = [RCTConvert UIColor:rootViewBackgroundColor]; | |
- } else { | |
- rootView.backgroundColor = [UIColor whiteColor]; | |
- } | |
- | |
+ RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions]; | |
+ RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil]; | |
+ rootView.backgroundColor = [UIColor whiteColor]; | |
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
- UIViewController *rootViewController = [UIViewController new]; | |
+ UIViewController *rootViewController = [self.reactDelegate createRootViewController]; | |
rootViewController.view = rootView; | |
self.window.rootViewController = rootViewController; | |
[self.window makeKeyAndVisible]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment