Latest 0.1.5
Homepage https://github.com/ribasal1/PickerPopupDialog
License MIT
Platforms ios 10.0
Authors

CI Status
Version
License
Platform

Description

PickerPopupDialog is a a popup iOS picker control written in Swift 4. It lets you input any type of data in the format [(Any, String)].

Sample Video

Table of Contents

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

CocoaPods

PickerPopupDialog is available through CocoaPods.

CocoaPods is a dependency manager for Swift and Objective-C that simplifies the use of 3rd-party
libraries like PickerPopupDialog in your projects.

First, add the following line to your Podfile:

pod "PickerPopupDialog"

Second, install PickerPopupDialog into your project:

pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and
provides you with binary frameworks.

To integrate PickerPopupDialog into your Xcode project using Carthage, specify it in your Cartfile:

github "ribasal1/PickerPopupDialog"

Run carthage update to build the framework and drag the built PickerPopupDialog.framework (in Carthage/Build/iOS folder)
into your Xcode project (Linked Frameworks and Libraries in Targets).

Manually

  1. Copy PickerPopupDialog.swift into your project
  2. That’s it

Usage

Import if you are using Cocoapods

import PickerPopupDialog

Set the data source, in viewDidLoad for example. It must be of type [(Any, String)]

let pickerView = PickerPopupDialog()
let myDataSource : [(Any, String)] = [(1, "First item"),(2, "Second item")]
pickerView.setDataSource(myDataSource)

Show the picker and use the selected value

pickerView.showDialog("My Title", doneButtonTitle: "Ok", cancelButtonTitle: "cancel") { (result) -> Void in
    //do something with the selected value
    //Value = result.0
    //Text = result.1

    //close window
    self.dismiss(animated: true, completion: nil)
}

Author

Alberto Ribas, [email protected]

License

PickerPopupDialog is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PickerPopupDialog",
    "version": "0.1.5",
    "summary": "Display a Picker inside a Popup Dialog. It also gives you the ability to separate displayed text from values",
    "description": "PickerPopupDialog is a a popup iOS picker control written in Swift 4. It lets you input any type of data in the format [(Any, String)].",
    "homepage": "https://github.com/ribasal1/PickerPopupDialog",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ribasal1": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ribasal1/PickerPopupDialog.git",
        "tag": "0.1.5"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "PickerPopupDialog/Classes/**/*",
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This