SKScreenBrightnessData

Objective-C

@interface SKScreenBrightnessData : SKSensorData

Swift

class SKScreenBrightnessData : SKSensorData

An instance of SKScreenBrightnessData encapsulates measurements related to the Screen Brightness sensor.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSensorType:(SKSensorType)sensorType
                                     timestamp:
                                         (nonnull SKSensorTimestamp *)timestamp;
  • Returns an SKScreenBrightnessData object, initialized with measurements of the screen brightness level.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLevel:(CGFloat)level;

    Swift

    init(level: CGFloat)

    Parameters

    level

    A float number that indicates the current screen brightness level. Value ranges from 0.0 (minimum brightness) to 1.0 (maximum brightness).

    Return Value

    An SKScreenBrightnessData object.

  • A float number that indicates the current screen brightness level. Value ranges from 0.0 (minimum brightness) to 1.0 (maximum brightness).

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat level;

    Swift

    var level: CGFloat { get }
  • A string with a CSV formatted header that describes the data of the Screen Brightness sensor. This method is useful in combination with the csvString instance method of an SKSensorData object.

    Declaration

    Objective-C

    + (nonnull NSString *)csvHeader;

    Swift

    class func csvHeader() -> String

    Return Value

    A string with a CSV header.