Skip to content

HunterLYS/Swift3.0-Dropdown-Menu

 
 

Repository files navigation

##Installation Just drop the DropMenuButton.swift to your project.

Implementation with Interface Builder

Add as the DropMenuButton.swift as custom class to your button as the image above:

Works great with autolayout and stackviews

Usage

Link the outlet in your View Controller and initialize the DropMenuButton with an array of strings and an array of functions. Here is the init function: drop.initMenu(["Item A", "Item B", "Item C"], actions: [({ () -> (Void) in print("Im doing the A Action") }), ({ () -> (Void) in print("Im doing the B Action") }), ({ () -> (Void) in print("Im doing the C Action") })])

The Dropdown Menu

You can choose any font or background color you want for the button, it will just copy the pattern and make the inverse colors for the items.

About

Dropdown menu for iOS applications written in Swift 3.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%