DTB

public enum DTB

Static name space.

静态对象命名空间。

  • Undocumented

    See more

    Declaration

    Swift

    public final class Configuration
  • Status bar height

    • I suggest using “safe area” instead of “const px” whenever possible.
    • Anyway, do NOT use it before window.makeKeyAndVisable

    • 仅用于老代码兼容,新代码不应再使用

    • 同时注意不要在 window.makeKeyAndVisable 之前,一般也就是首页布局中调用

    best practices

    Declaration

    Swift

    public static var statusBarHeight: CGFloat { get set }
  • Undocumented

    See more

    Declaration

    Swift

    public enum DebugTypes
  • Undocumented

    Declaration

    Swift

    public static func print(
        _ item: @autoclosure (() -> Any),
        type: DTB.DebugTypes = .original,
        file: String = #file,
        line: Int = #line,
        function: String = #function
    )
  • hf means “high fidelity”

    高保真

    See more

    Declaration

    Swift

    public enum HFBehaviors
  • String regular

    正则表达式定义

    Usage example:

        extension XM.Regulars {
            public static func phone() -> Self {}
        }
    
        let success: Bool = "123".xm.isRegular(.phone())
    
    See more

    Declaration

    Swift

    public struct Regulars
  • app

    应用级数据 / 内存处理 / 其他

    Declaration

    Swift

    public static let app: AppManager
  • 用于声明带类型推断的静态常量。

    Represents a Key with an associated generic value type.

    Special thanks: DefaultsKit

    Example:

        let key = DTB.ConstKey<[String: Any]>("myUserDefaultsKey")
    
    See more

    Declaration

    Swift

    public struct ConstKey<ValueType>