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

Dependencies

  • None
Last updated: Fri Jan 22 2021 20:27:05 GMT-0500 (GMT-05:00)