Latest 0.1.7
Homepage https://github.com/ChernyshenkoTaras/TCPickerView
License MIT
Platforms ios 9.0
Authors

Picker view popup with multiply rows selection written in Swift.

Requirements

TimeIntervalPicker works on iOS 9 and higher. 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, '9.0'
use_frameworks!
pod 'TCPickerView'

Manually

  1. Download and drop Classes and Assets folder in your project.
  2. Congratulations!

Example

import UIKit
import TCPickerView

class ViewController: UIViewController {

    @IBAction private func showButtonPressed(button: UIButton) {
        let picker = TCPickerView()
        picker.title = "Cars"
        let cars = [
            "Chevrolet Bolt EV",
            "Subaru WRX",
            "Porsche Panamera",
            "BMW 330e",
            "Chevrolet Volt",
            "Ford C-Max Hybrid",
            "Ford Focus"
        ]
        let values = cars.map { TCPickerView.Value(title: $0) }
        picker.values = values
        picker.completion = { (selectedIndexes) in
            for i in selectedIndexes {
                print(values[i].title)
            }
        }
        picker.show()
    }
}

License

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

Latest podspec

{
    "name": "TCPickerView",
    "version": "0.1.7",
    "summary": "Picker view popup with multiply rows selection written in Swift",
    "description": "Picker view popup with ability to select multiply rows written in Swift",
    "homepage": "https://github.com/ChernyshenkoTaras/TCPickerView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Taras Chernyshenko": "taras.chernyshenko@gmail.com"
    },
    "source": {
        "git": "https://github.com/ChernyshenkoTaras/TCPickerView.git",
        "tag": "0.1.7"
    },
    "social_media_url": "https://twitter.com/@t_chernyshenko",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "TCPickerView/TCPickerView/Classes/**/*",
    "ios": {
        "resource_bundles": {
            "TCPickerView": [
                "TCPickerView/TCPickerView/Resources/**/*.{xcassets}"
            ]
        }
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This