DEV Community

Cover image for Adding a SplashScreen in SwiftUI - #30DaysOfSwift
Vaibhav Dwivedi
Vaibhav Dwivedi

Posted on • Edited on

Adding a SplashScreen in SwiftUI - #30DaysOfSwift

Day 5: First Impressions Matter! 🚀

In the fifth post of #30DaysOfSwift series, we’ll focus on creating a Launch Screen for your app. This is the screen users see first when your app is loading, and it's a great way to introduce your app’s brand.

Why Use a SplashScreen?
It’s the first thing users see when they open your app. A launch screen makes the app feel more responsive during the loading process.

Image description

Here’s how you can quickly add a launch screen using LaunchScreen.storyboard in Xcode:

Steps to Add a Launch Screen:

1. Create a New Storyboard File:

  • Right-click on your project and select New File.
  • Choose Storyboard and name it LaunchScreen.storyboard.

2. Design the Launch Screen:

  • Open LaunchScreen.storyboard.
  • Drag in UI elements like an image or label that represents your app's logo or name.
  • Make sure to keep the design simple and aligned with your brand.

3. Set the Launch Screen in Xcode:

  • In the Project Navigator, go to the root of your project.
  • Under the General tab, scroll to the App Icons and Launch Images section.
  • In the Launch Screen File field, type LaunchScreen (or select it from the dropdown).

4. Test Your Launch Screen:

  • Run your app on a simulator or device, and you’ll see the launch screen appear before transitioning to your app’s main view.

How does it look? Let me know :)

Happy Coding!

Billboard image

Synthetic monitoring. Built for developers.

Join Vercel, Render, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs