ASBottomSheet
示例
要运行示例项目,请克隆仓库,然后首先从 Example 目录中运行 pod install
屏幕截图
安装
ASBottomSheet 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 即可
pod "ASBottomSheet"
然后,将模块导入到您的视图控制器中,创建一个面板并添加项到面板中,这样就完成了。
let first: ASBottomSheetItem = ASBottomSheetItem(withTitle: "Add Image", withIcon: UIImage.init(named: "image_icon")!)
first.action = {
print("First Action: Add image");
};
let second = ASBottomSheetItem(withTitle: "Add Sticker", withIcon: UIImage.init(named: "sticker_icon")!)
second.action = {
print("Second Action: Add Sticker");
};
let third = ASBottomSheetItem(withTitle: "Add Image", withIcon: UIImage.init(named: "image_icon")!)
third.action = {
print("Third Action: Add image");
};
let bottomSheet = ASBottomSheet.menu(withOptions: [first, second, third])
bottomSheet.showMenu(fromViewController: self)
作者
AdilSoomro
网站: BooleanBites
Twitter: adil_soomro
许可证
ASBottomSheet 在MIT许可证下可用。更多信息请参见LICENSE文件。