Browse Source

Improved splash screen

Arnaud Vergnet 4 years ago
parent
commit
2c8356f9d3

+ 2
- 2
ios/Campus.xcodeproj/project.pbxproj View File

274
 				CODE_SIGN_ENTITLEMENTS = Campus/application.entitlements;
274
 				CODE_SIGN_ENTITLEMENTS = Campus/application.entitlements;
275
 				CODE_SIGN_IDENTITY = "Apple Development";
275
 				CODE_SIGN_IDENTITY = "Apple Development";
276
 				CODE_SIGN_STYLE = Automatic;
276
 				CODE_SIGN_STYLE = Automatic;
277
-				CURRENT_PROJECT_VERSION = 2;
277
+				CURRENT_PROJECT_VERSION = 4;
278
 				DEAD_CODE_STRIPPING = NO;
278
 				DEAD_CODE_STRIPPING = NO;
279
 				DEVELOPMENT_TEAM = 6JA7CLNUV6;
279
 				DEVELOPMENT_TEAM = 6JA7CLNUV6;
280
 				INFOPLIST_FILE = Campus/Info.plist;
280
 				INFOPLIST_FILE = Campus/Info.plist;
300
 				CODE_SIGN_ENTITLEMENTS = Campus/application.entitlements;
300
 				CODE_SIGN_ENTITLEMENTS = Campus/application.entitlements;
301
 				CODE_SIGN_IDENTITY = "Apple Development";
301
 				CODE_SIGN_IDENTITY = "Apple Development";
302
 				CODE_SIGN_STYLE = Automatic;
302
 				CODE_SIGN_STYLE = Automatic;
303
-				CURRENT_PROJECT_VERSION = 2;
303
+				CURRENT_PROJECT_VERSION = 4;
304
 				DEVELOPMENT_TEAM = 6JA7CLNUV6;
304
 				DEVELOPMENT_TEAM = 6JA7CLNUV6;
305
 				INFOPLIST_FILE = Campus/Info.plist;
305
 				INFOPLIST_FILE = Campus/Info.plist;
306
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
306
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

+ 2
- 1
ios/Campus/AppDelegate.m View File

15
 #import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
15
 #import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
16
 
16
 
17
 #import <React/RCTLinkingManager.h>
17
 #import <React/RCTLinkingManager.h>
18
+#import "RNSplashScreen.h"
18
 
19
 
19
 @implementation AppDelegate
20
 @implementation AppDelegate
20
 
21
 
43
   [self.window makeKeyAndVisible];
44
   [self.window makeKeyAndVisible];
44
 
45
 
45
   [super application:application didFinishLaunchingWithOptions:launchOptions];
46
   [super application:application didFinishLaunchingWithOptions:launchOptions];
46
-
47
+  [RNSplashScreen show];
47
   return YES;
48
   return YES;
48
 }
49
 }
49
 
50
 

+ 15
- 23
ios/Campus/Base.lproj/LaunchScreen.xib View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
2
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
3
-    <device id="retina5_5" orientation="portrait" appearance="light"/>
3
+    <device id="retina3_5" orientation="portrait" appearance="light"/>
4
     <dependencies>
4
     <dependencies>
5
         <deployment identifier="iOS"/>
5
         <deployment identifier="iOS"/>
6
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
6
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
10
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
10
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
11
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
11
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
12
         <view contentMode="scaleToFill" id="iN0-l3-epB">
12
         <view contentMode="scaleToFill" id="iN0-l3-epB">
13
-            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
13
+            <rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
14
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
14
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
15
             <subviews>
15
             <subviews>
16
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
17
-                    <rect key="frame" x="20" y="439" width="441" height="21"/>
18
-                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
19
-                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
20
-                    <nil key="highlightedColor"/>
21
-                </label>
22
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Campus" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
23
-                    <rect key="frame" x="20" y="140" width="441" height="43"/>
24
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
25
-                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
26
-                    <nil key="highlightedColor"/>
27
-                </label>
16
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen" translatesAutoresizingMaskIntoConstraints="NO" id="MEu-9j-Yk9">
17
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="440"/>
18
+                </imageView>
28
             </subviews>
19
             </subviews>
29
-            <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
20
+            <color key="backgroundColor" red="0.74509803921568629" green="0.082352941176470587" blue="0.13333333333333333" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
30
             <constraints>
21
             <constraints>
31
-                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
32
-                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
33
-                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
34
-                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
35
-                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
36
-                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
22
+                <constraint firstItem="MEu-9j-Yk9" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="topMargin" id="JBv-Ns-A6x"/>
23
+                <constraint firstItem="MEu-9j-Yk9" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="JNO-FD-uRI"/>
24
+                <constraint firstItem="MEu-9j-Yk9" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="KdP-HF-t4U"/>
25
+                <constraint firstItem="MEu-9j-Yk9" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="LNb-Oe-Px1"/>
37
             </constraints>
26
             </constraints>
38
             <nil key="simulatedStatusBarMetrics"/>
27
             <nil key="simulatedStatusBarMetrics"/>
39
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
40
-            <point key="canvasLocation" x="548" y="455"/>
28
+            <modalPageSheetSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
29
+            <point key="canvasLocation" x="546.37681159420299" y="453.26086956521743"/>
41
         </view>
30
         </view>
42
     </objects>
31
     </objects>
32
+    <resources>
33
+        <image name="LaunchScreen" width="682.66668701171875" height="200"/>
34
+    </resources>
43
 </document>
35
 </document>

+ 21
- 0
ios/Campus/Images.xcassets/LaunchScreen.imageset/Contents.json View File

1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "scale" : "1x"
6
+    },
7
+    {
8
+      "idiom" : "universal",
9
+      "scale" : "2x"
10
+    },
11
+    {
12
+      "filename" : "splash.png",
13
+      "idiom" : "universal",
14
+      "scale" : "3x"
15
+    }
16
+  ],
17
+  "info" : {
18
+    "author" : "xcode",
19
+    "version" : 1
20
+  }
21
+}

BIN
ios/Campus/Images.xcassets/LaunchScreen.imageset/splash.png View File


+ 1
- 1
ios/Campus/Info.plist View File

42
 	<key>NSAppTransportSecurity</key>
42
 	<key>NSAppTransportSecurity</key>
43
 	<dict>
43
 	<dict>
44
 		<key>NSAllowsArbitraryLoads</key>
44
 		<key>NSAllowsArbitraryLoads</key>
45
-		<false/>
45
+		<true/>
46
 		<key>NSExceptionDomains</key>
46
 		<key>NSExceptionDomains</key>
47
 		<dict>
47
 		<dict>
48
 			<key>localhost</key>
48
 			<key>localhost</key>

Loading…
Cancel
Save