SwiftClock provides a modern analog clock powered by SwiftUI!
struct ContentView: View {
@State private var date: Date?
var body: some View {
TimelineView(.animation) { context in
Clock(date: $date)
.onChange(of: context.date) { oldValue, newValue in
date = newValue
}
}
.padding()
.background(.quinary)
}
}
Light Scheme | Dark Scheme |
---|---|
Switch Color Scheme Demonstration |
---|
- iOS 15.0 or later
- Mac Catalist 15.0 or later
- macOS Monterey 12.0 or later
- visionOS 1.0 or later
- 100% SwiftUI
- Adding clock faces
- Adding font support
- Adding time signal
- BlueSkyAnimal
- GNU AGPLv3
If the argument date
of Clock is nil... 🙈
Light Scheme | Dark Scheme |
---|---|