UIViewController

extension UIViewController

We add a couple of computed properties to report Dark Mode and High-Contrast Mode.

  • Returns true, if we are in Dark Mode.

    Declaration

    Swift

    var isDarkMode: Bool { get }
  • Returns true, if we are in High Contrast Mode.

    Declaration

    Swift

    var isHighContrastMode: Bool { get }
  • Returns true, if we are in Reduced Transparency Mode.

    Declaration

    Swift

    var isReducedTransparencyMode: Bool { get }