CountdownView

0.3.0

SwiftUI View to display sequence of views
kukushechkin/CountdownView

What's New

Switch to semantic versioning

2020-03-15T13:04:29Z

CountdownView SwiftUI view

A simple view to display sequence of views before something important starts.

@State private var start = false

...

.overlay(
    CountdownView(startOn: $start,
                  steps: ["3️⃣", "2️⃣", "1️⃣", "🔥🔥🔥"].map({ label in
                    AnyView(Text("\(label)")
                        .font(.system(size: 70))
                        .transition(.asymmetric(insertion: .move(edge: .leading),
                                                removal:   .move(edge: .trailing)))
                        .animation(.easeInOut(duration: 0.2)))
                  })) {
        self.workoutManager.makeAndStartNewWorkout(type: .test)
    }
    .background(
        Circle()
            .fill(Color.primary)
            .padding()
            .opacity(0.5)
    )
)

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Oct 18 2024 06:48:14 GMT-0900 (Hawaii-Aleutian Daylight Time)