Giter Club home page Giter Club logo

multiple-selection-picker's Introduction

MultiPickerView

Integration

  1. You can use CocoaPods to install MultiPickerView by adding it to your Podfile.

  2. Add this line to your Podfile pod 'MultiPickerView'

  3. Run the following command: pod install

  4. Don't forget to use the .xcworkspace file to open your project in Xcode, instead of the .xcodeproj file, from here on out.

  5. In the future, to update to the latest version of the SDK, just run: pod update MultiPickerView

Examples

There are 1 example app included in the repository:

  • Example

    Example app is a great place to start if you're evaluating whether you want to use our Standard Integration (Swift) or build your own Custom Integration (ObjC).

    Open ./Stripe.xcworkspace (not ./MultipleSelectionPickerView.xcworkspace) with Xcode run pod install in terminal.

    Build and run the "MultipleSelectionPickerView" scheme

Contributing

We welcome contributions of any kind including new features, bug fixes, and documentation improvements. Please first open an issue describing what you want to build if it is a major change so that we can discuss how to move forward. Otherwise, go ahead and open a pull request for minor changes such as typo fixes and one liners.

Features

PickerViewHandler,DatePickerViewHandler and MultipleSelectionPickerViewHandler easy to use. Create data let data = DataObj() DataObj will need to confitm to protocol PickerData

Create picker handeler private var pickerHandler = PickerViewHandler(data: data)

protocol PickerData: class {
    func id(for row: Int) -> Int
    func long(for row: Int) -> String
    func short(for row: Int) -> String
    func count() -> Int
}

When should show picker call config function and pass parent View Controller, data if you don't pass in initializer and onSelectedTitle closure if we need to update our view dynamically.

Create PickerDelegate listener if we need to listen show and close actions.

protocol PickerDelegate: class {
    func pickerDidHide(text: String, owner: UIView?, ids:[Int])
    func pickerTextIsEmpty(owner: UIView?)
}

In MultipleSelectionPickerViewHandler picker view is a custom view, you can override SelectionView

multiple-selection-picker's People

Contributors

brsoyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.