@@ -42,20 +42,20 @@ public enum UserInterfaceStyle: Int {
42
42
/// Constants that indicate whether the user interface has an active appearance.
43
43
public enum UserInterfaceActiveAppearance : Int {
44
44
/// The interface has an unspecified appearance.
45
- case unspecified
46
-
47
- /// The interface has an active appearance.
48
- case active
45
+ case unspecified = - 1
49
46
50
47
/// The interface has an inactive appearance.
51
48
case inactive
49
+
50
+ /// The interface has an active appearance.
51
+ case active
52
52
}
53
53
54
54
/// Constants that indicate the interface type for the device or an object that
55
55
/// has a trait environment, such as a view and view controller.
56
56
public enum UserInterfaceIdiom : Int {
57
57
/// An unspecified idiom.
58
- case unspecified
58
+ case unspecified = - 1
59
59
60
60
/// An interface designed for a phone.
61
61
case phone
@@ -66,52 +66,91 @@ public enum UserInterfaceIdiom: Int {
66
66
/// An interface designed for a TV.
67
67
case tv
68
68
69
- /// An interface designed for a car display.
70
- case car
69
+ @ available ( * , deprecated , message : " Use UserInterfaceIdiom.car " )
70
+ case carPlay
71
71
72
72
@available ( * , deprecated, renamed: " UserInterfaceIdiom.desktop " )
73
73
case mac
74
74
75
75
/// An interface designed for a tablet.
76
76
case tablet
77
77
78
+ /// An interface designed for a car display.
79
+ case car
80
+
78
81
/// An interface designed for a desktop or laptop.
79
82
case desktop
80
83
81
84
/// An interface designed for a AR/VR device.
82
85
case headset
83
86
}
84
87
88
+ /// Constants that indicate the visual level for content in the window.
85
89
public enum UserInterfaceLevel : Int {
86
- case unspecified
90
+ /// An unspecified interface level.
91
+ ///
92
+ /// Choose this option when you want to follow the inherited level.
93
+ case unspecified = - 1
94
+
95
+ /// The level for your window's main content.
87
96
case base
97
+
98
+ /// The level for content visually above your window's main content.
88
99
case elevated
89
100
}
90
101
102
+ /// Constants that indicate the layout direction associated with the current
103
+ /// environment.
91
104
public enum TraitEnvironmentLayoutDirection : Int {
92
- case unspecified
105
+ /// An unknown layout direction.
106
+ case unspecified = - 1
107
+
108
+ /// A left-to-right layout direction.
93
109
case leftToRight
110
+
111
+ /// A right-to-left layout direction.
94
112
case rightToLeft
95
113
}
96
114
115
+ /// Constants that indicate the accessibility contrast setting.
97
116
public enum AccessibilityContrast : Int {
98
- case unspecified
117
+ /// An unspecified contrast.
118
+ case unspecified = - 1
119
+
120
+ /// A normal contrast level.
99
121
case normal
122
+
123
+ /// A high contrast level.
100
124
case high
101
125
}
102
126
127
+ /// The font weight to apply to text.
128
+ ///
129
+ /// The legibility weight reflects the value of the Bold Text display setting.
103
130
public enum LegibilityWeight : Int {
104
- case unspecified
131
+ /// An unspecified text weight.
132
+ case unspecified = - 1
133
+
134
+ /// A regular font weight.
105
135
case regular
136
+
137
+ /// A bold font weight.
106
138
case bold
107
139
}
108
140
141
+ /// Keys that indicate the availability of 3D Touch on a device.
109
142
public enum ForceTouchCapability : Int {
143
+ /// The availability of 3D Touch is unknown.
144
+ ///
145
+ /// A view has this trait after you create it but before you add it your
146
+ /// application's view hierarchy.
110
147
case unspecified
111
- case available
112
- case unavailable
113
148
149
+ /// 3D Touch is available on the device.
150
+ case available
114
151
152
+ /// 3D Touch is not available on the device.
153
+ case unavailable
115
154
}
116
155
117
156
private func GetCurrentColorScheme( ) -> UserInterfaceStyle {
0 commit comments