Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qmathe/DropDownMenuKit
UIKit drop down menu, simple yet flexible and written in Swift
https://github.com/qmathe/DropDownMenuKit
control dropdown dropdown-menu ios menu navigation navigation-bar popup swift tableview ui uikit
Last synced: 3 months ago
JSON representation
UIKit drop down menu, simple yet flexible and written in Swift
- Host: GitHub
- URL: https://github.com/qmathe/DropDownMenuKit
- Owner: qmathe
- License: other
- Created: 2016-08-02T09:56:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T15:02:30.000Z (over 1 year ago)
- Last Synced: 2024-04-24T14:50:41.166Z (6 months ago)
- Topics: control, dropdown, dropdown-menu, ios, menu, navigation, navigation-bar, popup, swift, tableview, ui, uikit
- Language: Swift
- Size: 110 KB
- Stars: 301
- Watchers: 12
- Forks: 38
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - DropDownMenuKit - A simple, modular and highly customizable UIKit menu, that can be attached to the navigation bar or toolbar, written in Swift. (UI / Menu)
- awesome-ios-star - DropDownMenuKit - A simple, modular and highly customizable UIKit menu, that can be attached to the navigation bar or toolbar, written in Swift. (UI / Menu)
README
DropDownMenuKit
===============[![Build Status](https://travis-ci.org/qmathe/DropDownMenuKit.svg?branch=master)](https://travis-ci.org/qmathe/DropDownMenuKit)
[![Platforms iOS](https://img.shields.io/badge/Platforms-iOS-lightgray.svg?style=flat)](http://www.apple.com)
[![Language Swift 5](https://img.shields.io/badge/Language-Swift%205-orange.svg?style=flat)](https://swift.org)
[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/qmathe/DropDownMenuKit/LICENSE)DropDownMenuKit is a custom UIKit control to show a menu attached to the navigation bar or toolbar. The menu appears with a sliding animation and can be deeply customized. For example, with icons, embedded controls, or a checkmark to denote a selected row among multiple menu cells.
The control is made up of three parts:
- DropDownMenu: the menu itself, a UIView subclass that contains a UITableView presenting one or more DropDownMenuCell(s)
- DropDownMenuCell: a menu entry, implemented as a UITableViewCell subclass
- DropDownMenuTitleView: an optional title view to toggle the menu, which is usually put in the navigation bar and acts as a disclosure indicator
To see in action, take a look at the very beginning of [Placeboard](http://www.placeboardapp.com) demo video.
Compatibility
-------------DropDownMenuKit requires at least Xcode 10.2 (introducing Swift 5) and supports iOS 11 and higher.
For versions compatible with Swift 3 and 4, see branches named _swift-3/4.x_.
For now, the code base remains compatible with older iOS versions (8 or higher), but these older
versions are not supported anymore.Installation
------------### Carthage
Add the following line to your Cartfile, run `carthage update` to build the framework and drag the built DropDownMenuKit.framework into your Xcode project.
github "qmathe/DropDownMenuKit"
### CocoaPodsAdd the following lines to your Podfile and run `pod install` with CocoaPods 1.9 or newer.
pod "DropDownMenuKit"
### Manually
If you don't use Carthage or CocoaPods, it's possible to drag the built framework or embed the source files into your project.
#### Framework
Build DropDownMenuKit framework and drop it into your Xcode project.
#### Files
Drop DropDownMenu.swift, DropDownMenuCell.swift, DropDownTitleView.swift and DropDownMenuKit.xcassets into your Xcode project.
App Extension Usage
-------------------------### Build Settings
Add **-DAPP_EXTENSION** to _DropDownMenuKit > Build Settings > Other Swift Flags_.
### Restrictions
- `DropDownMenuCell.menuAction` must take a single argument
- `DropDownMenuCell.menuTarget` must not be nil