CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

TCTimeIntervalPicker 0.1.2

TCTimeIntervalPicker 0.1.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Taras Chernyshenko.



TimeIntervalPicker

UIDatePicker-like picker what allow you to select time interval similar to .countDownTimer mode but not limited with 24 hours

Requirements

TimeIntervalPicker works on iOS 8 and 9. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation
  • UIKit

Installation

Manually

  1. Download and drop TimeIntervalPicker.swift in your project.
  2. Congratulations!

Example

import UIKit
import TCTimeIntervalPicker

class ViewController: UIViewController {
    
    @IBAction private func showButtonPressed(button: UIButton) {
        let timePicker = TimeIntervalPicker()
        timePicker.titleString = "Select time:"
        timePicker.maxMinutes = 180
        timePicker.completion = { (timeInterval) in
            print(timeInterval)
        }
        timePicker.show(at: 0)
    }
}

License

This code is distributed under the terms and conditions of the MIT license.