ESTSettingPowerDarkToSleepEnable
@interface ESTSettingPowerDarkToSleepEnable : ESTSettingReadWrite <NSCopying>
ESTSettingPowerDarkToSleepEnable represents Power DarkToSleepEnable value.
-
Designated initializer. Validates provided value internally with +validationErrorForValue:.
See
+[ESTSettingPowerDarkToSleepEnable validationErrorForValue:]
Declaration
Objective-C
- (nonnull instancetype)initWithValue:(BOOL)enabled;Swift
init(value enabled: Bool)Parameters
enabledPower DarkToSleepEnable value.
Return Value
Initialized object. Nil if validation fails.
-
Returns current value of Power DarkToSleepEnable setting.
Declaration
Objective-C
- (BOOL)getValue;Swift
func getValue() -> BoolReturn Value
Power DarkToSleepEnable value.
-
Method allows to read value of initialized Power DarkToSleepEnable setting object.
Declaration
Objective-C
- (void)readValueWithCompletion: (nonnull ESTSettingPowerDarkToSleepEnableCompletionBlock)completion;Swift
func readValue(completion: @escaping ESTSettingPowerDarkToSleepEnableCompletionBlock)Parameters
completionBlock to be invoked when operation is complete.
-
Method allows to create write operation from already initialized Power DarkToSleepEnable setting object. Value provided during initialization will be used as a desired value.
Declaration
Objective-C
- (void)writeValue:(BOOL)enabled completion: (nonnull ESTSettingPowerDarkToSleepEnableCompletionBlock)completion;Swift
func writeValue(_ enabled: Bool, completion: @escaping ESTSettingPowerDarkToSleepEnableCompletionBlock)Parameters
enabledDarkToSleepEnable value to be written to the device.
completionBlock to be invoked when operation is complete.
-
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
enabledDarkToSleepEnable value.
Return Value
Error object describing why validation failed. Nil if validation passes.
View on GitHub
ESTSettingPowerDarkToSleepEnable Class Reference