Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/workingDog/ClockPicker
SwiftUI Clock Time Picker
https://github.com/workingDog/ClockPicker
Last synced: 3 months ago
JSON representation
SwiftUI Clock Time Picker
- Host: GitHub
- URL: https://github.com/workingDog/ClockPicker
- Owner: workingDog
- License: mit
- Created: 2019-11-20T00:53:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-05T13:21:30.000Z (over 3 years ago)
- Last Synced: 2024-06-28T03:43:13.734Z (8 months ago)
- Language: Swift
- Homepage:
- Size: 4.41 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
- fucking-about-SwiftUI - 🕒 Clock time picker
README
# SwiftUI Clock Time Picker example
![]()
![]()
![]()
![]()
An exampe of using [**ClockTimePicker**](https://github.com/workingDog/ClockTimePicker) library.
## Clock with hands
[**ClockTimePicker**](https://github.com/workingDog/ClockTimePicker) is a SwiftUI view that displays a clock with the hour and minutes hands.
These hands can be dragged around the clock face to select the desired hour and minutes of your date.See **ContenView.swift** for how to use it in your code.
The main element is **ClockPickerView.swift**.
Use it like a *DatePicker*, such as:
@State var date = Date()
ClockPickerView(date: $date)As the clock hands are changed, the *date* hour and minutes are updated.
To customise the looks of the clock, use
@ObservedObject var options = ClockLooks()
and change the options as desired, see *ContenView.swift*
## Clock without hands**ClockTimePicker** can also display a clock without hands, more suited to iPad and Mac. To display it set the options as:
options.withHands = false
To pick the hour and minutes, tap on the center **hour : minute** to display either the hours or the minutes set.
Note: adjust the sizes and colors using **options** to suit your device, see *ContenView.swift*
## Screenshots
 
 