33![ China.png] ( https://raw.githubusercontent.com/crazycodeboy/react-native-splash-screen/master/examples/Screenshots/China.png ) ** [ 简体中文] ( https://github.com/crazycodeboy/react-native-splash-screen/blob/master/README.zh.md ) | [ 原理解析] ( https://github.com/crazycodeboy/RNStudyNotes/blob/master/React%20Native%20%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E5%90%88%E9%9B%86/React%20Native%20%E5%90%AF%E5%8A%A8%E7%99%BD%E5%B1%8F%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3%E6%95%99%E7%A8%8B/React%20Native%20%E5%90%AF%E5%8A%A8%E7%99%BD%E5%B1%8F%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3%E6%95%99%E7%A8%8B.md ) **
44
55
6- A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
6+ A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
77
88## Content
99
@@ -41,7 +41,7 @@ project(':react-native-splash-screen').projectDir = new File(rootProject.project
4141dependencies {
4242 ...
4343 compile project(':react-native-splash-screen')
44- }
44+ }
4545```
4646
47473.Update the MainApplication.java file to use ` react-native-splash-screen ` via the following changes:
@@ -74,12 +74,12 @@ public class MainApplication extends Application implements ReactApplication {
7474** iOS:**
7575
76761 . In XCode, in the project navigator, right click ` Libraries ` ➜ ` Add Files to [your project's name] `
77- 2 . Go to ` node_modules ` ➜ ` react-native-launch-image ` and add ` SplashScreen.xcodeproj `
77+ 2 . Go to ` node_modules ` ➜ ` react-native-splash-screen ` and add ` SplashScreen.xcodeproj `
78783 . In XCode, in the project navigator, select your project. Add ` libSplashScreen.a ` to your project's ` Build Phases ` ➜ ` Link Binary With Libraries `
7979
8080
8181
82- ### Third step(Plugin Configuration):
82+ ### Third step(Plugin Configuration):
8383
8484** Android:**
8585
@@ -100,7 +100,7 @@ public class MainActivity extends ReactActivity {
100100
101101You should add following code to AppDelegate.m for keeping launch image:
102102
103-
103+
104104``` obj-c
105105
106106#import " AppDelegate.h"
@@ -112,7 +112,7 @@ You should add following code to AppDelegate.m for keeping launch image:
112112- (BOOL)application:(UIApplication * )application didFinishLaunchingWithOptions:(NSDictionary * )launchOptions
113113{
114114 // ...other code
115-
115+
116116 [SplashScreen show]; // here
117117 return YES;
118118}
@@ -145,7 +145,14 @@ Add a file called launch_screen.xml in the layout as the splash screen.
145145 android:background="@drawable/launch_screen">
146146</LinearLayout>
147147```
148+ **Learn more to see [examples](https://github.com/crazycodeboy/react-native-splash-screen/tree/master/examples)**
149+
150+
151+ **iOS**
152+
153+ iOS can be used to customize your startup screen via LaunchImage or LaunchScreen.xib.
148154
155+ **Learn more to see [examples](https://github.com/crazycodeboy/react-native-splash-screen/tree/master/examples)**
149156
150157Then you can use it like this:
151158
@@ -165,8 +172,8 @@ export default class WelcomePage extends Component {
165172
166173
167174Method | Type | Optional | Description
168- ----------------- | -------- | -------- | -----------
169- show() | function | false | Open splash screen
175+ ----------------- | -------- | -------- | -----------
176+ show() | function | false | Open splash screen
170177hide() | function | false | Close splash screen
171178
172179## Contribution
0 commit comments