All Projects → tungvoduc → DTButtonMenuController

tungvoduc / DTButtonMenuController

Licence: MIT license
A simple and fully customizable way to display a button menu.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

DTButtonMenuController

Version License Platform

Example

Screenshot

DTButtonMenuController is extremely easy to use. For minimal intergration in your project, here is what you need to do:

let viewController = DTButtonMenuController(highlightedView: view)
itemSize = CGSize(width: 50, height: 50)
itemsDistanceToTouchPoint = 100

// Add five item buttons into controller
for _ in 0...4 {
	let item = DTMenuButton(completionHandlerBlock: { (button: DTMenuButton) in
    		
         })
     })
            
    // Extra configuration for item button, e.g backgroundColor, image, rounded corner
            
    // Add item button to controller
    viewController.addItem(item)
}

present(viewController, animated: true, completion: nil)

In common cases, you will not use DTButtonMenuController but subclass it and make your own controller.

Requirements

Installation

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

pod "DTButtonMenuController"

Author

Tung Vo, [email protected]

License

DTButtonMenuController is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].