var editMode : Binding<EditMode >?
var isEnabled : Bool
var isFocused : Bool
var isPresented : Bool
var isSearching : Bool
var scenePhase : ScenePhase
Availability 有効性
Technology
var isLuminanceReduced: Bool
{ get set }
The system typically sets this value to true
on watchOS when the user lowers their wrist, but the display remains on. When you detect this condition, lower the overall brightness of your view. For example, you can change large, filled shapes to be stroked, and choose less bright colors:
var isLuminanceReduced (\.isLuminanceReduced)
var body: some View {
if isLuminanceReduced {
Circle()
.stroke(Color.gray, lineWidth: 10)
} else {
Circle()
.fill(Color.white)
}
}
In addition to the changes that you make, the system might also dim the display to achieve a suitable brightness. By reacting to is
, you can preserve contrast and readability while helping to satisfy the reduced brightness requirement.
Note 注意
Starting in watchOS 8, the system keeps your view visible on wrist down by default. If you want the system to blur the screen instead, as it did in earlier versions of watchOS, set the value for the WKSupports
key in your app’s Information Property List file to false
.
var editMode : Binding<EditMode >?
var isEnabled : Bool
var isFocused : Bool
var isPresented : Bool
var isSearching : Bool
var scenePhase : ScenePhase