I'm working on a .NET Maui project. I am currently trying to implement a splash screen with a custom logo and background colour. Android displays well after setting the correct value on the BaseSize property within the project file.
The problem is on iOS where the beginning and end of the logo appear off the screen. No matter what I set the BaseSize to the image doesn't update in size, it remains the same.
Your help would be much appreciated.
You could design your own LaunchScreen-Storyboard in XCode and add the Source-Code to your App-Projects' LaunchScreen.storyboard file:

Add your SplashScreen-Image as PNG e.g. YourSplashImage.png to folder \Resource\Splash\ in XCode.
In your LaunchScreen within XCode add an Image View and reference your Image there.
Design your SplashScreen in XCode. Do it also for different Views and Orientations (Regular/Compact), e.g. for iPad 10th generation or iPhone 14 Pro Max setting Constraints for the corresponding View and Orientation (Portrait/Landscape). This will help to have the layout you want and display your SplashScreen correctly on different devices and also different orientations when you start your app in Portrait or Landscape orientation. You could also have a totally different design for Portrait and Landscape Orientation if you want:




\Resources\Images\.. folder as a PNG:
\Platforms\iOS\..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>UILaunchStoryboardName</key>
<string>LaunchScreen.storyboard</string>
</dict>
</plist>
<Project Sdk="Microsoft.NET.Sdk">
...
<ItemGroup Condition="'$(TargetFramework)'!='net7.0-ios'">
<MauiSplashScreen Include="Resources\Splash\YourSplashImage.png" Color="#000000" BaseSize="1024,1024" Resize="false"/>
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Images\YourSplashImage.png" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net7.0-ios'">
<InterfaceDefinition Include="LaunchScreen.storyboard" />
<BundleResource Include="Resources\Images\YourSplashImage.png" />
</ItemGroup>
...
</Project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With