AlertPlugin
public protocol AlertPlugin : AnyObject
弹窗插件协议,应用可自定义弹窗实现
-
showAlert(title:
Default implementationmessage: style: cancel: actions: promptCount: promptBlock: actionBlock: cancelBlock: customBlock: in: ) 显示弹出框插件方法,默认使用系统UIAlertController
Default Implementation
显示弹出框插件方法,默认使用系统UIAlertController
Declaration
Swift
func showAlert(title: AttributedStringParameter?, message: AttributedStringParameter?, style: AlertStyle, cancel: AttributedStringParameter?, actions: [AttributedStringParameter]?, promptCount: Int, promptBlock: ((_ textField: UITextField, _ index: Int) -> Void)?, actionBlock: ((_ values: [String], _ index: Int) -> Void)?, cancelBlock: (() -> Void)?, customBlock: ((_ alertController: Any) -> Void)?, in viewController: UIViewController)
-
showSheet(title:
Default implementationmessage: cancel: actions: currentIndex: actionBlock: cancelBlock: customBlock: in: ) 显示操作表插件方法,默认使用系统UIAlertController
Default Implementation
显示操作表插件方法,默认使用系统UIAlertController
Declaration
Swift
func showSheet(title: AttributedStringParameter?, message: AttributedStringParameter?, cancel: AttributedStringParameter?, actions: [AttributedStringParameter]?, currentIndex: Int, actionBlock: ((_ index: Int) -> Void)?, cancelBlock: (() -> Void)?, customBlock: ((_ alertController: Any) -> Void)?, in viewController: UIViewController)
-
hideAlert(animated:
Default implementationcompletion: in: ) 手工隐藏弹出框插件方法,默认查找UIAlertController|AlertController
Default Implementation
手工隐藏弹出框插件方法,默认查找UIAlertController|AlertController
Declaration
Swift
func hideAlert(animated: Bool, completion: (() -> Void)?, in viewController: UIViewController)
-
isShowingAlert(in:
Default implementation) 判断是否正在显示弹出框插件方法,默认查找UIAlertController|AlertController
Default Implementation
判断是否正在显示弹出框插件方法,默认查找UIAlertController|AlertController
Declaration
Swift
func isShowingAlert(in viewController: UIViewController) -> Bool