AGAlertView 0.1.0

AGAlertView 0.1.0

Azat Goktas 维护。



AGAlertView

CI Status Version License Platform

屏幕截图

单个按钮默认图片

Demo

两个按钮自定义图片

Demo

带取消的按钮

Demo

示例

要运行示例项目,请先克隆存档,并在 Example 目录中运行 pod install

需求

  • iOS 9 或更高版本

安装

AGAlertView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod 'AGAlertView'

作者

Azat Goktas, [email protected]

如何使用

导入 AGAlertView

import AGAlertView

添加按钮。

let button1 = AGButton(frame: .zero, title: "Button1")
AGAlert().showAlert(title: "Hey Yo", subtitle: "Thats it", buttons: button1)

添加按钮和自定义图片。您可以为按钮添加动作。

let button1 = AGButton(frame: .zero, title: "Button1")
let button2 = AGButton(title: "Button2", selector: #selector(buttonTapped), target: self)
AGAlert().showAlert(title: "Hey Yo", subtitle: "Thats it", buttons: button1,button2, image: UIImage(named: "frog"))

添加具有取消类型按钮。

let button1 = AGButton(frame: .zero, title: "Button1")
let button2 = AGButton(title: "Cancel",buttonStyle: .cancel)
AGAlert().showAlert(title: "Hey Yo", subtitle: "Thats it", buttons: button2,button1)

许可协议

AGAlertView 遵循 MIT 许可协议。有关更多信息,请参阅 LICENSE 文件。