MCPcopy
hub / github.com/zoontek/react-native-bootsplash / getStoryboard

Function getStoryboard

src/extras/utils.ts:511–566  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

509};
510
511const getStoryboard = (props: Props) => {
512 const { background, logo, fileNameSuffix } = props;
513
514 const { R, G, B } = background.rgb;
515 const frameWidth = 375;
516 const frameHeight = 667;
517
518 return dedent`
519<?xml version="1.0" encoding="UTF-8"?>
520<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
521 <device id="retina4_7" orientation="portrait" appearance="light"/>
522 <dependencies>
523 <deployment identifier="iOS"/>
524 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
525 <capability name="Named colors" minToolsVersion="9.0"/>
526 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
527 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
528 </dependencies>
529 <scenes>
530 <!--View Controller-->
531 <scene sceneID="EHf-IW-A2E">
532 <objects>
533 <viewController modalTransitionStyle="crossDissolve" id="01J-lp-oVM" sceneMemberID="viewController">
534 <view key="view" autoresizesSubviews="NO" contentMode="scaleToFill" id="Ze5-6b-2t3">
535 <rect key="frame" x="0.0" y="0.0" width="${frameWidth}" height="${frameHeight}"/>
536 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
537 <subviews>
538 <imageView autoresizesSubviews="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" image="BootSplashLogo-${fileNameSuffix}" translatesAutoresizingMaskIntoConstraints="NO" id="3lX-Ut-9ad">
539 <rect key="frame" x="${(frameWidth - logo.width) / 2}" y="${(frameHeight - logo.height) / 2}" width="${logo.width}" height="${logo.height}"/>
540 <accessibility key="accessibilityConfiguration">
541 <accessibilityTraits key="traits" image="YES" notEnabled="YES"/>
542 </accessibility>
543 </imageView>
544 </subviews>
545 <viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
546 <color key="backgroundColor" name="BootSplashBackground-${fileNameSuffix}"/>
547 <constraints>
548 <constraint firstItem="3lX-Ut-9ad" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="Fh9-Fy-1nT"/>
549 <constraint firstItem="3lX-Ut-9ad" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="nvB-Ic-PnI"/>
550 </constraints>
551 </view>
552 </viewController>
553 <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
554 </objects>
555 <point key="canvasLocation" x="0.0" y="0.0"/>
556 </scene>
557 </scenes>
558 <resources>
559 <image name="BootSplashLogo-${fileNameSuffix}" width="${logo.width}" height="${logo.height}"/>
560 <namedColor name="BootSplashBackground-${fileNameSuffix}">
561 <color red="${R}" green="${G}" blue="${B}" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
562 </namedColor>
563 </resources>
564</document>
565`;
566};
567
568export const writeIOSAssets = async ({

Callers 1

writeIOSAssetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…