gh-EmergeTools-Pow/Example/Pow Example/Examples/Transitions/ClockExample.swift
Joe Fabisevich 5b95fe95b0
Moving Pow to @emergetools (#36)
Co-authored-by: Robert Böhnke <robb@robb.is>
Co-authored-by: Kasper Lahti <kasper@lahti.email>
2023-11-29 12:08:53 -03:00

29 lines
660 B
Swift

import Pow
import SwiftUI
struct ClockExample: View, Example {
@State
var isVisible: Bool = false
var body: some View {
ZStack {
if isVisible {
PlaceholderView()
.transition(.movingParts.clock(blurRadius: 10))
}
}
.defaultBackground()
.onTapGesture {
withAnimation(.spring(dampingFraction: 1)) {
isVisible.toggle()
}
}
.autotoggle($isVisible, with: .spring(dampingFraction: 1))
}
static let localPath = LocalPath()
static var icon: Image? {
Image(systemName: "clock")
}
}