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!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Use Playwright to test. Use Playwright to monitor.

Join Vercel, CrowdStrike, and thousands of other teams that run end-to-end monitors on Checkly's programmable monitoring platform.

Get started now!

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay