Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tokijh/JHDropDownMenu
dropdown menu in UIView by extension
https://github.com/tokijh/JHDropDownMenu
Last synced: 3 months ago
JSON representation
dropdown menu in UIView by extension
- Host: GitHub
- URL: https://github.com/tokijh/JHDropDownMenu
- Owner: tokijh
- License: mit
- Created: 2018-04-17T14:01:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-26T03:42:35.000Z (almost 7 years ago)
- Last Synced: 2024-11-08T04:10:29.344Z (4 months ago)
- Language: Swift
- Homepage:
- Size: 6.2 MB
- Stars: 25
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JHDropDownMenu
[](https://swift.org)
[](https://travis-ci.org/tokijh/JHDropDownMenu)
[](http://cocoapods.org/pods/JHDropDownMenu)
[](http://cocoapods.org/pods/JHDropDownMenu)
[](http://cocoapods.org/pods/JHDropDownMenu)## Introduction
Dropdown menu in UIView by extension
## 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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
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
* [tokijh](https://github.com/tokijh)## Thanks to
* [younatics](https://github.com/younatics)
* [YNDropDownMenu](https://github.com/younatics/YNDropDownMenu)## License
JHDropDownMenu is available under the MIT License See the [LICENSE](LICENSE) file for more info.