GithubHelp home page GithubHelp logo

xingyunlong / dropdownmenu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhubinchen/dropdownmenu

0.0 0.0 0.0 941 KB

iOS下拉菜单,也可以实现类似NSComboBox的效果

License: MIT License

Shell 53.54% Ruby 2.45% Objective-C 3.82% Swift 40.19%

dropdownmenu's Introduction

ZHDropDownMenu

CI Status Version License Platform

Example

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

Requirements

  • Swift 4.0
  • iOS 8+

Useage

  1. drag a view into Storyboard, and set its class to ZHDropDownMenu

  1. set options & other properties

    menu.options = ["1992","1993","1994","1995","1996","1997","1998"]//设置下拉列表项数据
    menu.defaultValue = "1992" //设置默认值
    menu.editable = false //禁止编辑
    menu.showBorder = false //不显示边框
    menu.delegate = self //设置代理
    
  2. Implement the delegate

    //选择完后回调
    func dropDownMenu(menu: ZHDropDownMenu!, didChoose index: Int) {
        print("\(menu) choosed at index \(index)")
    }
    
    //编辑完成后回调
    func dropDownMenu(menu: ZHDropDownMenu!, didInput text: String!) {
        print("\(menu) input text \(text)")
    }
    

Installation

ZHDropDownMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ZHDropDownMenu'

Author

[email protected]

License

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

dropdownmenu's People

Contributors

jamesthekid avatar xylxi avatar zhubinchen 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.