case standard
SwiftUI displays views with standard contrast between the app’s foreground and background colors.
case increased
SwiftUI displays views with increased contrast between the app’s foreground and background colors.
Availability 有効性
Technology
enum ColorSchemeContrast
You receive a contrast value when you read the color
environment value. The value tells you if a standard or increased contrast currently applies to the view. SwiftUI updates the value whenever the contrast changes, and redraws views that depend on the value. For example, the following Text
view automatically updates when the user enables increased contrast:
private var colorSchemeContrast (\.colorSchemeContrast)
var body: some View {
Text(colorSchemeContrast == .standard ? "Standard" : "Increased")
}
The user sets the contrast by selecting the Increase Contrast option in Accessibility > Display in System Preferences on macOS, or Accessibility > Display & Text Size in the Settings app on iOS. Your app can’t override the user’s choice. For information about using color and contrast in your app, see Color and Contrast.
case standard
case increased
init?(UIAccessibilityContrast )
static var allCases : [ColorSchemeContrast ]
typealias AllCases
static func == (ColorSchemeContrast , ColorSchemeContrast ) -> Bool
static func != (Self, Self) -> Bool
func hash(into: inout Hasher)
var hashValue : Int
enum ColorScheme
enum EditMode
enum UserInterfaceSizeClass