AlertControllerAppearance

public class AlertControllerAppearance : NSObject, @unchecked Sendable

自定义弹窗控制器样式配置类

  • 单例模式,统一设置样式

    Declaration

    Swift

    public static let appearance: AlertControllerAppearance
  • 自定义首选动作句柄,默认nil,跟随系统

    Declaration

    Swift

    public var preferredActionBlock: (@MainActor @Sendable (_ alertController: AlertController) -> AlertAction?)?
  • 标题颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var titleColor: UIColor?
  • 标题字体,仅全局生效,默认nil

    Declaration

    Swift

    public var titleFont: UIFont?
  • 消息颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var messageColor: UIColor?
  • 消息字体,仅全局生效,默认nil

    Declaration

    Swift

    public var messageFont: UIFont?
  • 默认动作颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var actionColor: UIColor?
  • 首选动作颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var preferredActionColor: UIColor?
  • 取消动作颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var cancelActionColor: UIColor?
  • 警告动作颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var destructiveActionColor: UIColor?
  • 禁用动作颜色,仅全局生效,默认nil

    Declaration

    Swift

    public var disabledActionColor: UIColor?
  • 自定义配置项

    Declaration

    Swift

    public var lineWidth: CGFloat
  • Undocumented

    Declaration

    Swift

    public var cancelLineWidth: CGFloat
  • Undocumented

    Declaration

    Swift

    public var contentInsets: UIEdgeInsets
  • Undocumented

    Declaration

    Swift

    public var actionHeight: CGFloat
  • Undocumented

    Declaration

    Swift

    public var actionFont: UIFont?
  • Undocumented

    Declaration

    Swift

    public var actionBoldFont: UIFont?
  • Undocumented

    Declaration

    Swift

    public var imageTitleSpacing: CGFloat
  • Undocumented

    Declaration

    Swift

    public var titleMessageSpacing: CGFloat
  • Undocumented

    Declaration

    Swift

    public var textFieldHeight: CGFloat
  • Undocumented

    Declaration

    Swift

    public var textFieldTopMargin: CGFloat
  • Undocumented

    Declaration

    Swift

    public var textFieldSpacing: CGFloat
  • Undocumented

    Declaration

    Swift

    public var normalColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var selectedColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var lineColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var cancelLineColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var lightLineColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var darkLineColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var containerBackgroundColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var titleDynamicColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var textFieldBackgroundColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var alertRedColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var grayColor: UIColor?
  • Undocumented

    Declaration

    Swift

    public var textFieldCornerRadius: CGFloat
  • Undocumented

    Declaration

    Swift

    public var textFieldCustomBlock: (@MainActor @Sendable (UITextField) -> Void)?
  • Undocumented

    Declaration

    Swift

    public var alertCornerRadius: CGFloat
  • Undocumented

    Declaration

    Swift

    public var alertEdgeDistance: CGFloat
  • Undocumented

    Declaration

    Swift

    public var sheetCornerRadius: CGFloat
  • Undocumented

    Declaration

    Swift

    public var sheetEdgeDistance: CGFloat
  • Undocumented

    Declaration

    Swift

    public var sheetContainerTransparent: Bool
  • Undocumented

    Declaration

    Swift

    public var sheetContainerInsets: UIEdgeInsets
  • 是否启用Controller样式,设置后自动启用

    Declaration

    Swift

    public var controllerEnabled: Bool { get }
  • 是否启用Action样式,设置后自动启用

    Declaration

    Swift

    public var actionEnabled: Bool { get }