ViewLoadingState

public enum ViewLoadingState<Object> : Equatable

视图加载状态枚举,兼容UIKit和SwiftUI

  • Undocumented

    Declaration

    Swift

    case ready
  • Undocumented

    Declaration

    Swift

    case loading
  • Undocumented

    Declaration

    Swift

    case success(_: Object? = nil)
  • Undocumented

    Declaration

    Swift

    case failure(_: Error? = nil)
  • 获取成功状态的对象,其他状态返回nil

    Declaration

    Swift

    public var object: Object? { get }
  • 获取失败状态的错误,其他状态返回nil

    Declaration

    Swift

    public var error: Error? { get }
  • Declaration

    Swift

    public static func == (lhs: ViewLoadingState<Object>, rhs: ViewLoadingState<Object>) -> Bool