测试经过测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新版本 | 2017年8月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Anton Stremovskiy 维护。
具有渐变背景动画和自定义按钮的自定义动画 alertViewcontroller
支持 iOS 9 及以上版本
pod 'ASCustomAlertView'
import ASCustomAlertView
@IBAction func createAlert() {
showPopUpAction(text: "This is Header", message: "alert message should be here", buttons: [AlertButton.okButton])
}
@IBAction func createAlert2() {
let button = AlertButton(title: "White Text", backColor: .asCoolBlueTwo, textColor: .asWhite)
button.action = {
debugPrint("Button 2 clicked")
}
showPopUpAction(text: "Header", message: "alert message should be here", buttons: [button])
}
func showPopUpAction(text: String, message: String? = nil, buttons: [AlertButton]) {
presentPopUp(with: NSMutableAttributedString.h1(string: text), message: NSMutableAttributedString.m1(string: message), image: UIImage(named: "placeholder"), buttonsLayout: .horizontal, buttons: buttons)
}
Anton Stremovskiy