DropDownStack 1.0.0

DropDownStack 1.0.0

由:ThanhNguyen 维护。



  • 作者:
  • Nguyen Chi Thanh

DropDownStack

DropdownStack 是一组按钮。简单直观,可以展示性别、语言等短菜单。

Video Walkthrough

安装

Coacoapods

使用 CocoaPods 安装,请在 Podfile 文件中复制并粘贴以下内容

pod 'DropDownStack'
手动安装

您也可以用老方法——拖拽源文件到您的项目中,一切就绪。

使用方法

let items = [
            DropDownView<Int>.Item(title: "English", model: 0),
            DropDownView.Item(title: "Vietnamese", model: 1),
            DropDownView.Item(title: "Chinese", model: 2),
            DropDownView.Item(title: "Japanese", model: 3),
        ]
let config = DropDownConfiguration(itemSize: .dynamic, checkIcon: UIImage(named: "icon-check"))
let dropDownView = DropDownView(items: items, configuration: config)
dropDownView.didSelect = { item in
  print("did select \(item)")
}