Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eef1ad4

Browse files
added spash screen for ios
1 parent d643e30 commit eef1ad4

File tree

17 files changed

+338
-194
lines changed

17 files changed

+338
-194
lines changed

‎android/app/build.gradle‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ android {
138138
}
139139

140140
dependencies {
141+
implementation project(':react-native-splash-screen')
141142
implementation project(':react-native-gesture-handler')
142143
implementation fileTree(dir: "libs", include: ["*.jar"])
143144
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

‎android/app/src/main/java/com/rnr/MainApplication.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import org.devio.rn.splashscreen.SplashScreenReactPackage;
67
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
78
import com.facebook.react.ReactNativeHost;
89
import com.facebook.react.ReactPackage;
@@ -24,6 +25,7 @@ public boolean getUseDeveloperSupport() {
2425
protected List<ReactPackage> getPackages() {
2526
return Arrays.<ReactPackage>asList(
2627
new MainReactPackage(),
28+
new SplashScreenReactPackage(),
2729
new RNGestureHandlerPackage()
2830
);
2931
}

‎android/settings.gradle‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'rnr'
2+
include ':react-native-splash-screen'
3+
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
24
include ':react-native-gesture-handler'
35
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
46

‎app.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "create-react-native-redux-thunk-app",
3-
"displayName": "create-react-native-redux-thunk-app"
2+
"name": "rnr",
3+
"displayName": "rnr"
44
}

‎ios/rnr.xcodeproj/project.pbxproj‎

Lines changed: 225 additions & 127 deletions
Large diffs are not rendered by default.

‎ios/rnr/AppDelegate.m‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#import <React/RCTBridge.h>
1111
#import <React/RCTBundleURLProvider.h>
1212
#import <React/RCTRootView.h>
13+
#import "RNSplashScreen.h"
1314

1415
@implementation AppDelegate
1516

@@ -27,6 +28,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2728
rootViewController.view = rootView;
2829
self.window.rootViewController = rootViewController;
2930
[self.window makeKeyAndVisible];
31+
[RNSplashScreen show];
3032
return YES;
3133
}
3234

‎ios/rnr/Base.lproj/LaunchScreen.xib‎

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
3+
<device id="retina5_9" orientation="portrait">
4+
<adaptation id="fullscreen"/>
5+
</device>
36
<dependencies>
47
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
6-
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
710
</dependencies>
811
<objects>
912
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -12,31 +15,18 @@
1215
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
1316
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1417
<subviews>
15-
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
16-
<rect key="frame" x="20" y="439" width="441" height="21"/>
17-
<fontDescription key="fontDescription" type="system" pointSize="17"/>
18-
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19-
<nil key="highlightedColor"/>
20-
</label>
21-
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="rnr" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22-
<rect key="frame" x="20" y="140" width="441" height="43"/>
23-
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24-
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
25-
<nil key="highlightedColor"/>
26-
</label>
18+
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="SplashScreen" translatesAutoresizingMaskIntoConstraints="NO" id="gBN-Kn-isy">
19+
<rect key="frame" x="120" y="176" width="240" height="128"/>
20+
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
21+
</imageView>
2722
</subviews>
28-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
29-
<constraints>
30-
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
31-
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
32-
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
33-
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
34-
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
35-
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
36-
</constraints>
23+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3724
<nil key="simulatedStatusBarMetrics"/>
3825
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
3926
<point key="canvasLocation" x="548" y="455"/>
4027
</view>
4128
</objects>
29+
<resources>
30+
<image name="SplashScreen" width="200.33332824707031" height="200"/>
31+
</resources>
4232
</document>

‎ios/rnr/Images.xcassets/AppIcon.appiconset/Contents.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
313
{
414
"idiom" : "iphone",
515
"size" : "29x29",
@@ -29,6 +39,11 @@
2939
"idiom" : "iphone",
3040
"size" : "60x60",
3141
"scale" : "3x"
42+
},
43+
{
44+
"idiom" : "ios-marketing",
45+
"size" : "1024x1024",
46+
"scale" : "1x"
3247
}
3348
],
3449
"info" : {

‎ios/rnr/Images.xcassets/Contents.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"version" : 1,
44
"author" : "xcode"
55
}
6-
}
6+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "icon.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "icon@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "icon@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /