EmptyPlugin

@MainActor
public protocol EmptyPlugin : AnyObject

空界面插件协议,应用可自定义空界面插件实现

  • 显示空界面,指定文本、详细文本、图片、加载视图和最多两个动作按钮

    Default Implementation

    默认实现,显示空界面,指定文本、详细文本、图片、加载视图和最多两个动作按钮

    Declaration

    Swift

    @MainActor
    func showEmptyView(
        text: NSAttributedString?,
        detail: NSAttributedString?,
        image: UIImage?,
        loading: Bool,
        actions: [NSAttributedString]?,
        block: (@MainActor @Sendable (Int, Any) -> Void)?,
        customBlock: (@MainActor @Sendable (Any) -> Void)?,
        in view: UIView
    )
  • hideEmptyView(in:) Default implementation

    隐藏空界面

    Default Implementation

    默认实现,隐藏空界面

    Declaration

    Swift

    @MainActor
    func hideEmptyView(in view: UIView)
  • showingEmptyView(in:) Default implementation

    获取正在显示的空界面视图

    Default Implementation

    默认实现,获取正在显示的空界面视图

    Declaration

    Swift

    @MainActor
    func showingEmptyView(in view: UIView) -> UIView?