DropDownMenuKit

UIKit drop down menu, simple yet flexible and written in Swift

Github星跟踪图

DropDownMenuKit

Build Status
Platforms iOS
Language Swift 5
License MIT

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 demo video.

Compatibility

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"

CocoaPods

Add the following lines to your Podfile and run pod install with CocoaPods 0.36 or newer.

use_frameworks!

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

主要指标

概览
名称与所有者qmathe/DropDownMenuKit
主编程语言Swift
编程语言Swift (语言数: 3)
平台
许可证Other
所有者活动
创建于2016-08-02 09:56:19
推送于2023-03-05 15:02:30
最后一次提交2023-03-05 16:01:53
发布数9
最新版本名称1.0 (发布于 2023-03-05 16:02:25)
第一版名称0.8 (发布于 2016-08-23 13:23:25)
用户参与
星数304
关注者数12
派生数38
提交数119
已启用问题?
问题数26
打开的问题数4
拉请求数3
打开的拉请求数0
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?