Skip to content

Commit 58ccfbb

Browse files
committed
updated usage for ios
1 parent e6492a3 commit 58ccfbb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ npm install react-native-smart-splash-screen --save
2929

3030
* In your project, Look for Header Search Paths and make sure it contains $(SRCROOT)/../node_modules/react-native-smart-splash-screen/ios/RCTSplashScreen/RCTSplashScreen
3131

32-
* Click on LaunchScreen.xib > right utilities panel "Attributes Inspector" > get the name of the image used (labeled "Image") (PS: you should follow the Apple XCode guide to set the LaunchScreen if there's not Image field set)
32+
* delete your project's LaunchScreen.xib
33+
34+
* Drag SplashScreenResource folder to your project *if you want change image, replace splash.png or add a image with your custom name*
3335

3436
* In AppDelegate.m
3537

@@ -43,7 +45,8 @@ RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
4345
initialProperties:nil
4446
launchOptions:launchOptions];
4547
46-
[RCTSplashScreen open:rootView withImageNamed:@"image-name-from-LaunchScreen.xib"]; // activate splashscreen, imagename from LaunchScreen.xib
48+
//[RCTSplashScreen open:rootView];
49+
[RCTSplashScreen open:rootView withImageNamed:@"splash"]; // activate splashscreen, imagename from LaunchScreen.xib
4750
4851
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
4952

0 commit comments

Comments
 (0)