Skip to content

BlueSkyAnimal/SwiftClock

Repository files navigation

SwiftClock

SwiftClock provides a modern analog clock powered by SwiftUI!

Usage

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)
    }
}

Screenshot

Light Scheme Dark Scheme
Clock - Light Scheme Clock - Dark Scheme

Video

Switch Color Scheme Demonstration
Clock - Video

System Requirements

  • iOS 15.0 or later
  • Mac Catalist 15.0 or later
  • macOS Monterey 12.0 or later
  • visionOS 1.0 or later

Framework

  • 100% SwiftUI

Feature Checklist

  • Adding clock faces
  • Adding font support
  • Adding time signal

Author

  • BlueSkyAnimal

License

  • GNU AGPLv3

Little Bonus 🎁

If the argument date of Clock is nil... 🙈

Light Scheme Dark Scheme
Bonus - Light Scheme Bonus - Dark Scheme

About

SwiftClock is modern analog clock powered by SwiftUI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages