CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2017 |
SPMSupports SPM | ✗ |
Maintained by WangWenzhuang.
封装了 UIAlertView,简单易用,Block 回调,丢掉各种 tag。
你可以使用 CocoaPods 安装 ZKAlertView
,在你的 Podfile
中添加:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'ZKAlertView'
end
ZKAlertView
文件夹到您的项目ZKAlertView
import ZKAlertView
ZKAlertView.show(message: "不显示标题,显示一个按钮", buttonTitle: "确定")
ZKAlertView.show("标题", message: "显示标题,显示一个按钮", buttonTitle: "确定")
ZKAlertView.show(message: "不显示标题,显示一个按钮,包含回调", buttonTitle: "确定") {
print("不显示标题,显示一个按钮,包含回调")
}
ZKAlertView.show("标题", message: "显示标题,显示一个按钮,包含回调", buttonTitle: "确定") {
print("不显示标题,显示一个按钮,包含回调")
}
ZKAlertView.show(message: "不显示标题,显示多个按钮,包含回调", cancleButtonTitle: "取消", otherButtonTitles: "按钮1", "按钮2") { (alertView, buttonIndex) in
print("按钮点击索引:\(buttonIndex)")
}
ZKAlertView.show("标题", message: "显示标题,显示多个按钮,包含回调", cancleButtonTitle: "取消", otherButtonTitles: "按钮1", "按钮2") { (alertView, buttonIndex) in
print("按钮点击索引:\(buttonIndex)")
}