Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Endore8/TimePicker
Better time picker for iOS.
https://github.com/Endore8/TimePicker
ios swift
Last synced: 8 days ago
JSON representation
Better time picker for iOS.
- Host: GitHub
- URL: https://github.com/Endore8/TimePicker
- Owner: endore8
- License: mit
- Archived: true
- Created: 2017-02-16T14:20:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-04-02T07:41:48.000Z (over 2 years ago)
- Last Synced: 2024-11-10T22:41:43.102Z (about 1 month ago)
- Topics: ios, swift
- Language: Swift
- Homepage:
- Size: 54.7 KB
- Stars: 14
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - TimePicker - Configurable time picker component based on a pan gesture and its velocity. (Date & Time / Getting Started)
- awesome-ios-star - TimePicker - Configurable time picker component based on a pan gesture and its velocity. (Date & Time / Getting Started)
- fucking-awesome-ios - TimePicker - Configurable time picker component based on a pan gesture and its velocity. (Date & Time / Getting Started)
- fucking-awesome-ios - TimePicker - Configurable time picker component based on a pan gesture and its velocity. (Date & Time / Getting Started)
README
# TimePicker
Better TimePicker for iOS
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## Requirements
- Swift 5.0
- iOS 10.0+
- Xcode 10.2+## Installation
The easiest way is through [CocoaPods](https://cocoapods.org). Simply add the dependency to your Podfile and then pod install:
```
pod 'TimePicker'
```Or [Carthage](https://github.com/Carthage/Carthage). Add the dependency to your Cartfile and then carthage update:
```
github "Endore8/TimePicker"
```## Usage
###
``` swift
let timePicker = TimePicker()
view.addSubview(timePicker)
```### Config
``` swift
timePicker.config = TimePickerConfig(
text: TimePickerConfig.Text( // Configurations for hh:mm labels
color: .black,
font: .systemFont(
ofSize: 28,
weight: .semibold
)
),
time: TimePickerConfig.Time( // Time calculator configs
initial: TimePickerConfig.Time.initialTime, // Initial time interval (0 - 24 * 60 * 60)
step: TimePickerConfig.Time.timeStepRange.lowerBound, // Minimum change step (0 - 30 minutes)
format: TimePickerConfig.Time.Format.auto // Time format
)
)
```## ToDo
- [ ] Tests
- [ ] Swiping bubbles to hint gestures
- [ ] Code documentation## License
The library is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).