ViewStyle

public struct ViewStyle<Base> : RawRepresentable, Equatable, Hashable, Sendable where Base : UIView

视图样式可扩展枚举

定义UIView通用default样式示例:

extension ViewStyle where Base: UIView {
    public static var `default`: Self { .init("default") }
}

自定义UITextField扩展custom样式示例:

extension ViewStyle where Base: UITextField {
    public static var custom: Self { .init("custom") }
}
  • Declaration

    Swift

    public typealias RawValue = String
  • Declaration

    Swift

    public var rawValue: String
  • Declaration

    Swift

    public init(rawValue: String)
  • Undocumented

    Declaration

    Swift

    public init(_ rawValue: String)