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:
Check out this recipe for in-depth description of the component and its code. Check out SwiftUIRecipes.com for more SwiftUI recipes!
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)
}
}
}
}
This component is distrubuted as a Swift package.
link |
Stars: 5 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics