ESTSettingSensorsMotionNotificationEnable

@interface ESTSettingSensorsMotionNotificationEnable
    : ESTSettingReadWrite <NSCopying>

ESTSettingSensorsMotionNotificationEnable represents Sensors MotionNotificationEnable value, AKA MotionDetectionEnable.

  • Designated initializer. Validates provided value internally with +validationErrorForValue:.

    See

    +[ESTSettingSensorsMotionNotificationEnable validationErrorForValue:]

    Declaration

    Objective-C

    - (nonnull instancetype)initWithValue:(BOOL)enabled;

    Swift

    init(value enabled: Bool)

    Parameters

    enabled

    Sensors MotionNotificationEnable value.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of Sensors MotionNotificationEnable setting.

    Declaration

    Objective-C

    - (BOOL)getValue;

    Swift

    func getValue() -> Bool

    Return Value

    Sensors MotionNotificationEnable value.

  • Method allows to read value of initialized Sensors MotionNotificationEnable setting object.

    Declaration

    Objective-C

    - (void)readValueWithCompletion:
        (nonnull ESTSettingSensorsMotionNotificationEnableCompletionBlock)
            completion;

    Swift

    func readValue(completion: @escaping ESTSettingSensorsMotionNotificationEnableCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method allows to create write operation from already initialized Sensors MotionNotificationEnable setting object. Value provided during initialization will be used as a desired value.

    Declaration

    Objective-C

    - (void)writeValue:(BOOL)enabled
            completion:
                (nonnull ESTSettingSensorsMotionNotificationEnableCompletionBlock)
                    completion;

    Swift

    func writeValue(_ enabled: Bool, completion: @escaping ESTSettingSensorsMotionNotificationEnableCompletionBlock)

    Parameters

    enabled

    MotionNotificationEnable value to be written to the device.

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method checks if provided value is allowed. Returns nil if validation passes.

    Declaration

    Objective-C

    + (NSError *_Nullable)validationErrorForValue:(BOOL)enabled;

    Swift

    class func validationError(forValue enabled: Bool) -> Error?

    Parameters

    enabled

    MotionNotificationEnable value.

    Return Value

    Error object describing why validation failed. Nil if validation passes.