Instance Property

brightness

The brightness level of the screen.

Declaration

var brightness: CGFloat { get set }

Discussion

This property is only supported on the main screen. The value of this property should be a number between 0.0 and 1.0, inclusive.

Brightness changes made by an app remain in effect until the device is locked, regardless of whether the app is closed. The system brightness (which the user can set in Settings or Control Center) is restored the next time the display is turned on.

See Also

Setting a Display’s Brightness

var wantsSoftwareDimming: Bool

A Boolean value that indicates whether the screen may be dimmed lower than the hardware is normally capable of by emulating it in software.