bamlab / react-native-make

A collection of everyday React Native CLI tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SplashScreen does not take up the screen size on a Ipad

opened this issue · comments

Hello,

I just installed version 3.0.0 of @bam.tech/react-native-make

When I run the following command, my image does not take all the screen on an ipad :

react-native set-splash --platform ios --resize cover --path

Capture d’écran 2020-05-13 à 12 07 55

@beattractive have you solved this one?

Hello @thinklinux

I patched into my project to solve the problem.
The "cover" mode does not let the image take all the space on an ipad.

here is the patch

diff --git a/node_modules/@bam.tech/react-native-make/templates/ios/SplashScreen.cover.storyboard b/node_modules/@bam.tech/react-native-make/templates/ios/SplashScreen.cover.storyboard
index 57c091b..97de404 100644
--- a/node_modules/@bam.tech/react-native-make/templates/ios/SplashScreen.cover.storyboard
+++ b/node_modules/@bam.tech/react-native-make/templates/ios/SplashScreen.cover.storyboard
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -12,31 +11,14 @@
         <scene sceneID="EHf-IW-A2E">
             <objects>
                 <viewController id="01J-lp-oVM" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                    <imageView key="view" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SplashImage" id="SSh-a0-ObC">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
-                                <rect key="frame" x="207" y="876" width="0.0" height="0.0"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SplashImage" translatesAutoresizingMaskIntoConstraints="NO" id="RL8-Sx-rSy">
-                                <rect key="frame" x="0" y="0" width="100%" height="100%"/>
-                            </imageView>
-                        </subviews>
-                        <color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                        <constraints>
-                            <constraint firstItem="RL8-Sx-rSy" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="07j-vS-pLh"/>
-                            <constraint firstItem="RL8-Sx-rSy" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="sUH-2V-BCR"/>
-                        </constraints>
-                        <viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
-                    </view>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    </imageView>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="53" y="375"/>
+            <point key="canvasLocation" x="52.734375" y="374.67057101024886"/>
         </scene>
     </scenes>
     <resources>

@beattractive Thank you!!! :)

No answer :(
I close my request!