Latest 0.3.0
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit

DKDropMenu is a simple iOS drop down list written in Swift. It expands and collapses. It allows the user to select only one item at a time. Items are just Strings. A delegate is notified when selection occurs. DKDropMenu is IBDesignable and IBInspectable with customizable colors, font, and row heights.



Use the cocoapod DKDropMenu or simply include DKDropMenu.swift in your project. DKDropMenu 0.3.0 and above requires Swift 4. Use version 0.2.0 for Swift 3 Support. Use version 0.1.6 for Swift 2 support.


Create a DKDropMenu in IB or in code (using UIView’s init methods). Then add items and set a delegate:

dropMenu.add(names: ["hello", "goodbye", "why?"])
dropMenu.delegate = self

Make sure to implement the single method the delegate (DKDropMenuDelegate) must implement:

func itemSelected(withIndex: Int, name: String) {
    println("(name) selected");

The delegate can also optionally implement the method

func collapsedChanged()

to be notified when the collapse status of the menu changes.

Items can be added or removed

func add(names: [String])
func add(name: String)
func remove(atIndex: Int)
func remove(name: String)
func removeAll()

The properties collapsed (Bool) and selectedItem (String) can be manually modified.

License and Authorship

Released under the MIT License. Copyright 2015-2016 David Kopec. Please open issues on GitHub.

Latest podspec

    "name": "DKDropMenu",
    "version": "0.3.0",
    "license": "MIT",
    "summary": "A simple iOS drop down list written in Swift.",
    "homepage": "",
    "social_media_url": "",
    "authors": {
        "David Kopec": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.3.0"
    "screenshots": "",
    "platforms": {
        "ios": "8.0"
    "frameworks": "UIKit",
    "source_files": "DKDropMenu.swift",
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This