ToastPlugin

public protocol ToastPlugin : AnyObject

吐司插件协议,应用可自定义吐司插件实现

  • 显示加载吐司,默认需手工隐藏,指定cancelBlock时点击会自动隐藏并调用之

    Default Implementation

    默认实现,显示加载吐司,默认需手工隐藏,指定cancelBlock时点击会自动隐藏并调用之

    Declaration

    Swift

    func showLoading(attributedText: NSAttributedString?, cancelBlock: (() -> Void)?, customBlock: ((Any) -> Void)?, in view: UIView)
  • hideLoading(delayed:in:) Default implementation

    隐藏加载吐司,可指定延迟隐藏从而实现连续的加载效果

    Default Implementation

    默认实现,隐藏加载吐司,可指定延迟隐藏从而实现连续的加载效果

    Declaration

    Swift

    func hideLoading(delayed: Bool, in view: UIView)
  • showingLoadingView(in:) Default implementation

    获取正在显示的加载吐司视图

    Default Implementation

    默认实现,获取正在显示的加载吐司视图

    Declaration

    Swift

    func showingLoadingView(in view: UIView) -> UIView?
  • 显示进度条吐司,默认需手工隐藏,指定cancelBlock时点击会自动隐藏并调用之

    Default Implementation

    默认实现,显示进度条吐司,默认需手工隐藏,指定cancelBlock时点击会自动隐藏并调用之

    Declaration

    Swift

    func showProgress(attributedText: NSAttributedString?, progress: CGFloat, cancelBlock: (() -> Void)?, customBlock: ((Any) -> Void)?, in view: UIView)
  • hideProgress(in:) Default implementation

    隐藏进度条吐司

    Default Implementation

    默认实现,隐藏进度条吐司

    Declaration

    Swift

    func hideProgress(in view: UIView)
  • showingProgressView(in:) Default implementation

    获取正在显示的进度条吐司视图

    Default Implementation

    默认实现,获取正在显示的进度条吐司视图

    Declaration

    Swift

    func showingProgressView(in view: UIView) -> UIView?
  • 显示指定样式消息吐司,可设置自动隐藏和允许交互,自动隐藏完成后回调

    Default Implementation

    默认实现,显示指定样式消息吐司,可设置自动隐藏和允许交互,自动隐藏完成后回调

    Declaration

    Swift

    func showMessage(attributedText: NSAttributedString?, style: ToastStyle, autoHide: Bool, interactive: Bool, completion: (() -> Void)?, customBlock: ((Any) -> Void)?, in view: UIView)
  • hideMessage(in:) Default implementation

    隐藏消息吐司

    Default Implementation

    默认实现,隐藏消息吐司

    Declaration

    Swift

    func hideMessage(in view: UIView)
  • showingMessageView(in:) Default implementation

    获取正在显示的消息吐司视图

    Default Implementation

    默认实现,获取正在显示的消息吐司视图

    Declaration

    Swift

    func showingMessageView(in view: UIView) -> UIView?