Swiftpack.co - globulus/swiftui-splash-screen as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by globulus.
globulus/swiftui-splash-screen 1.0.0
Add a splash screen to your SwiftUI views!
⭐️ 5
🕓 2 years ago
iOS
.package(url: "https://github.com/globulus/swiftui-splash-screen.git", from: "1.0.0")

SwiftUISplashScreen

Add a Splash Screen to your SwiftUI app! You can specify a custom view that will show when your app starts and then dismiss itself automatically after a certain period of time.

The end result looks like this:

in action

Recipe

Check out this recipe for in-depth description of the component and its code. Check out SwiftUIRecipes.com for more SwiftUI recipes!

Sample usage

struct HomeView: View {
  var body: some View {
    List(1..<6) { index in
      Text("Item \(index)")
    }.splashView {
      ZStack {
        Color.blue
        Text("SwiftUIRecipes is awesome!")
          .fontWeight(.bold)
          .font(.system(size: 24))
          .foregroundColor(.white)
      }
    }
  }
}

Installation

This component is distrubuted as a Swift package.

GitHub

link
Stars: 5
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics