TimePicker
  • April 7, 2024

Better TimePicker for iOS

Requirements


  • Swift 5.0
  • iOS 10.0+
  • Xcode 10.2+

Installation


The easiest way is through CocoaPods. Simply add the dependency to your Podfile and then pod install:

pod ‘TimePicker’

Or Carthage. Add the dependency to your Cartfile and then carthage update:

github “Endore8/TimePicker”

Usage


 

let timePicker = TimePicker()
view.addSubview(timePicker)

Config

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

GitHub


View Github

#awesome #cocoapods #dribbble #ios #swift #time-picker
YOU MIGHT ALSO LIKE...
ConfettiView

A SwiftUI View that emits confetti with user-defined shapes, images, and text.

SwiftUI Colour Wheel

A colour wheel made all in SwiftUI. There are 2 different colour wheels to choose from. The first main one ...

ColorPickerRing

A color picker implementation with color wheel appearance written in plain SwiftUI. It is compatible with UIColor and NSColor.

ASCollectionView

This repository is no longer maintained. Here's why: with the release of iOS 16 SwiftUI now enables most of the ...