You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dropdown Menu for iOS with many customizable parameters to suit any needs.
Inspired by UIPickerView.
Installation
CocoaPods
MKDropdownMenu is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod'MKDropdownMenu'
Manually
Add MKDropdownMenu folder to your Xcode project.
#import "MKDropdownMenu.h" in your code.
Usage
See the example Xcode project.
Basic setup
Create the MKDropdownMenu instance and add it as a subview to your view. Set the dataSource and delegate properties to your view controller implementing MKDropdownMenuDataSource and MKDropdownMenuDelegate protocols.
You can also set up the MKDropdownMenu in Interface Builder.
Add a UIView and set its class to MKDropdownMenu in the Identity inspector.
Connect the dataSource and delegate outlets to your view controller.
Populating the data
The MKDropdownMenuDataSource and MKDropdownMenuDelegate protocols APIs are inspired by the UIPickerView interface, so most of the methods should be familiar if you used it before.
and the delegate methods that suit your needs. The most simple way to get started is to provide the titles for the header components and the rows in the following delagate methods: