Latest 0.1.2
Homepage https://github.com/ChernyshenkoTaras/TimeIntervalPicker
License MIT
Platforms ios 8.0
Authors

TimeIntervalPicker

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

TCTimeIntervalPicker

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

CocoaPods

You can use CocoaPods to install TimeIntervalPicker by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'CTTimeIntervalPicker'

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.

Latest podspec

{
    "name": "TCTimeIntervalPicker",
    "version": "0.1.2",
    "summary": "UIDatePicker-like picker in .countDownTimer mode with range selection support",
    "description": "UIDatePicker-like picker in .countDownTimer mode what gives you ability to change max hours",
    "homepage": "https://github.com/ChernyshenkoTaras/TimeIntervalPicker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Taras Chernyshenko": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ChernyshenkoTaras/TimeIntervalPicker.git",
        "tag": "0.1.2"
    },
    "social_media_url": "https://twitter.com/@t_chernyshenko",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "TimeIntervalPicker/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This