Skip to content

Commit 1679cac

Browse files
committed
update README to reflect the option to re-use the LaunchScreen.xib as the splash image
1 parent 044702a commit 1679cac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ 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-
* delete your project's LaunchScreen.xib
33-
34-
* Dray SplashScreenResource folder to your project *if you want change image, replace splash.png*
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)
3533

3634
* In AppDelegate.m
3735

@@ -45,7 +43,7 @@ RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
4543
initialProperties:nil
4644
launchOptions:launchOptions];
4745
48-
[RCTSplashScreen open:rootView]; //activate splashscreen
46+
[RCTSplashScreen open:rootView withImageNamed:@"image-name-from-LaunchScreen.xib"]; // activate splashscreen, imagename from LaunchScreen.xib
4947
5048
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
5149

0 commit comments

Comments
 (0)