AlertPluginImpl
open class AlertPluginImpl : NSObject, AlertPlugin
默认弹窗插件
-
单例模式
Declaration
Swift
@objc(sharedInstance) public static let shared: AlertPluginImpl
-
自定义Alert弹窗样式,nil时使用单例
Declaration
Swift
open var customAlertAppearance: AlertAppearance?
-
自定义ActionSheet弹窗样式,nil时使用单例
Declaration
Swift
open var customSheetAppearance: AlertAppearance?
-
自定义弹窗类数组,默认nil时查找UIAlertController|AlertController
Declaration
Swift
open var customAlertClasses: [AnyClass]?
-
弹窗自定义句柄,show方法自动调用
Declaration
Swift
open var customBlock: ((UIAlertController) -> Void)?
-
默认close按钮文本句柄,alert单按钮或sheet单取消生效。未设置时为关闭
Declaration
Swift
open var defaultCloseButton: ((UIAlertController.Style) -> AttributedStringParameter?)?
-
默认cancel按钮文本句柄,alert多按钮或sheet生效。未设置时为取消
Declaration
Swift
open var defaultCancelButton: ((UIAlertController.Style) -> AttributedStringParameter?)?
-
默认confirm按钮文本句柄,alert多按钮生效。未设置时为确定
Declaration
Swift
open var defaultConfirmButton: (() -> AttributedStringParameter?)?
-
错误标题格式化句柄,error生效,默认nil
Declaration
Swift
open var errorTitleFormatter: ((Error?) -> AttributedStringParameter?)?
-
错误消息格式化句柄,error生效,默认nil
Declaration
Swift
open var errorMessageFormatter: ((Error?) -> AttributedStringParameter?)?
-
错误样式格式化句柄,error生效,默认nil
Declaration
Swift
open var errorStyleFormatter: ((Error?) -> AlertStyle)?
-
错误按钮格式化句柄,error生效,默认nil
Declaration
Swift
open var errorButtonFormatter: ((Error?) -> AttributedStringParameter?)?
-
showAlert(title:
message: style: cancel: actions: promptCount: promptBlock: actionBlock: cancelBlock: customBlock: in: ) Declaration
Swift
open func showAlert(title: AttributedStringParameter?, message: AttributedStringParameter?, style: AlertStyle, cancel: AttributedStringParameter?, actions: [AttributedStringParameter]?, promptCount: Int, promptBlock: ((UITextField, Int) -> Void)?, actionBlock: (([String], Int) -> Void)?, cancelBlock: (() -> Void)?, customBlock: ((Any) -> Void)? = nil, in viewController: UIViewController)
-
Declaration
Swift
open func showSheet(title: AttributedStringParameter?, message: AttributedStringParameter?, cancel: AttributedStringParameter?, actions: [AttributedStringParameter]?, currentIndex: Int, actionBlock: ((Int) -> Void)?, cancelBlock: (() -> Void)?, customBlock: ((Any) -> Void)? = nil, in viewController: UIViewController)
-
Declaration
Swift
open func hideAlert(animated: Bool, completion: (() -> Void)? = nil, in viewController: UIViewController)
-
Declaration
Swift
open func isShowingAlert(in viewController: UIViewController) -> Bool