Skip to content

tokijh/JHDropDownMenu

Repository files navigation

JHDropDownMenu

Swift 4 CI Status Version License Platform

Introduction

Dropdown menu in UIView by extension

sample

Noti

JHDropDownMenu updated differently from 1.0. If you used 1.0 you should modify code or use pod 'JHDropDownMenu', '~> 1.0'

Example

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

Installation

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

pod 'JHDropDownMenu'

Usage

import JHDropDownMenu

Now you can use dropdown any UIView

let dropdown = UIView.getDropDown(T.self)

You can set items as follows

dropdown.set(items: [T], cellView: ((T) -> UIView))

Also you can set multiple section items as follows

dropdown.set(items: [[T]], cellView: ((T) -> UIView), sectionView: ((T) -> UIView?))

Customize

You can customize listView (UITableView)

dropdown.setupListView: (UITableView -> Void)

Also welcome to PR whenever.

Author

Thanks to

License

JHDropDownMenu is available under the MIT License See the LICENSE file for more info.