0

I'm using Xamarin Forms to make a cross-platform application with a splash screen. My splash screen design is simply a centered image with a single color background so that both iOS and Android devices launching my app can seamlessly transition into my Xamarin Forms Shared Code. Once my Xamarin Forms application starts, I land the user on a ContentPage that matches the SplashScreen's layout. From this page, I run all of my app's start-up tasks.

After some modifications on Android, I was able to disable the fade animation between the launcher and the application. Now, I would like to do the same thing on iOS.

Similar to Android, iOS's LaunchScreen.stroyboard has a Fade-Out Animation when transitioning to the main application by default. I would like to know how I can disable the animation so that I can have my desired SplashScreen transition.

I tried using the Swift Editor Assistant but every time I open it with my LaunchScreen.storyboard, it says "No Assistant Results." Next, I tried to open my LaunchScreen.storyboard with the source code editor. With this I was able to see the code however, I'm not sure what value I need to add or where to add it in order to disable the animation.

Here is my LaunchScreen.storyboard Source Code:

<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="olI-5Z-Ti1">
    <device id="retina6_7" orientation="portrait" appearance="light"/>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="k5D-YV-QzF">
            <objects>
                <viewController id="olI-5Z-Ti1" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="g5H-NR-ohv"/>
                        <viewControllerLayoutGuide type="bottom" id="Aaz-be-cI5"/>
                    </layoutGuides>
                    <view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Ju3-CL-BWr">
                        <rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" image="app_logo_white.png" translatesAutoresizingMaskIntoConstraints="NO" id="gCl-fY-0VN">
                                <rect key="frame" x="139" y="388" width="150" height="150"/>
                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                            </imageView>
                        </subviews>
                        <color key="backgroundColor" red="0.8901960784313725" green="0.043137254901960784" blue="0.043137254901960784" alpha="1" colorSpace="calibratedRGB"/>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="3wl-m6-tKk" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-414" y="215"/>
        </scene>
    </scenes>
    <resources>
        <image name="app_logo_white.png" width="245.75999450683594" height="245.75999450683594"/>
    </resources>
</document>
  • Make your app's opening screen look identical to the launch screen. Behold, no transition. – matt Mar 15 '23 at 22:54
  • They are already identical. The problem is that there is a fade-out animation when the LaunchScreen.storyboard transitions to my app's opening screen. Android had a similar default effect but I was able to disable it. Now it is a completely unnoticeable transition on Android. I want to know if it is possible to disable the Fade-Out transition between the LaunchScreen.storyboard and the app's opening screen so that I can have the same result on iOS. @matt – Bryson Scales Mar 16 '23 at 12:33
  • Our app has an opening screen identical to the launch screen. You can't tell the difference. There is no fade from one to the other. If you see a fade out then you're doing something else wrong. In general the effect should be that your real interface fades in, not out. You haven't given enough info to reproduce this mysterious fade out. – matt Mar 16 '23 at 12:41
  • Create a new Xamarin Forms Project and run it on iOS. There is a default fade out animation as the LaunchScreen.storyboard transitions into the Xamarin Forms App. Since I initially posted this question, I was able to find a solution. For anybody that is new to making Splash Screens using Xamarin Forms, I'm making a more detailed post explaining everything I did to get my desired splash screen! Thanks for your responsiveness! @matt – Bryson Scales Mar 16 '23 at 15:15
  • Hey it's cool that you solved it. You can give your solution as an answer to your own question here (totally encouraged on Stack Overflow). – matt Mar 16 '23 at 16:39
  • Haha! Well, unfortunately, the solution I thought I had found didn't actually work so it looks like I'm back to square 1 @matt :( – Bryson Scales Mar 16 '23 at 20:21
  • This might help: [How do I hide the launch image without fading it out?](https://stackoverflow.com/questions/22029536/how-do-i-hide-the-launch-image-without-fading-it-out) – Liqun Shen-MSFT Mar 21 '23 at 08:51

0 Answers0