Skip to content

Instantly share code, notes, and snippets.

@parth-koshta
Created January 8, 2022 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parth-koshta/d5bb708bfe849b685bc9de639ae00a03 to your computer and use it in GitHub Desktop.
Save parth-koshta/d5bb708bfe849b685bc9de639ae00a03 to your computer and use it in GitHub Desktop.
Medium article - splash screen
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RNBootSplash.h" // add this line
// ...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//...
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
[RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView]; // add this line
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment