ATActionSheet
需求
- iOS 9.0+
- Xcode 9.3
安装
只需将此项目作为子模块添加到您的项目中。
或使用 CocoaPods 和 Podfile
pod 'ATActionSheet'
用法
编程方式
let actionSheet = ATActionSheet()
let addButton = ATAction(title: "Add New Item", image: #imageLiteral(resourceName: "add")) {
print("Added")
}
let shareButton = ATAction(title: "Share", image: #imageLiteral(resourceName: "action")) {
print("Share")
}
let deleteButton = ATAction(title: "Delete", image: #imageLiteral(resourceName: "trash")) {
print("Deleted")
}
actionSheet.addActions([addButton, shareButton, deleteButton])
present(actionSheet, animated: true, completion: nil)
许可证
ATActionSheet开源协议为MIT。详情请查看 LICENSE。