2024-03-08 13:50:48 +01:00
|
|
|
//Made by Lumaa
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct ComingSoonView: View {
|
2024-03-23 09:48:29 +01:00
|
|
|
init() {}
|
|
|
|
|
2024-03-08 13:50:48 +01:00
|
|
|
@State private var spin: CGFloat = 0
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
VStack(spacing: 5) {
|
|
|
|
Text(String("👀"))
|
|
|
|
.font(.system(size: 62))
|
2024-03-23 09:48:29 +01:00
|
|
|
.padding()
|
|
|
|
.background(Color.gray.opacity(0.3))
|
|
|
|
.clipShape(Circle())
|
|
|
|
.tapToSpin(spin: $spin)
|
2024-03-08 13:50:48 +01:00
|
|
|
|
|
|
|
Text("coming-soon")
|
|
|
|
.font(.title.bold())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-23 09:48:29 +01:00
|
|
|
extension View {
|
|
|
|
func tapToSpin(spin: Binding<CGFloat>, defaultValue: CGFloat = 0) -> some View {
|
|
|
|
self
|
|
|
|
.rotation3DEffect(.degrees(spin.wrappedValue), axis: (x: 0, y: 1, z: 0))
|
|
|
|
.onTapGesture {
|
|
|
|
withAnimation(.spring.speed(0.8)) {
|
|
|
|
spin.wrappedValue = 360
|
|
|
|
}
|
|
|
|
spin.wrappedValue = defaultValue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-08 13:50:48 +01:00
|
|
|
#Preview {
|
|
|
|
ComingSoonView()
|
|
|
|
}
|