PSPDFBrightnessManager


@interface PSPDFBrightnessManager : NSObject

Allows to manage device brightness and wraps brightness change notifiations into a simple to monitor property.

The brighness manager does not perform any automatic screen dimming or changing.

Note

An additional software window is used when wantsAdditionalSoftwareDimming is enabled to further darken the screen beyond iOS default capabilities.
  • Enables software dimming. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL wantsSoftwareDimming;

    Swift

    var wantsSoftwareDimming: Bool { get set }
  • Enables additional software dimming to make the screen really dark. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL wantsAdditionalSoftwareDimming;

    Swift

    var wantsAdditionalSoftwareDimming: Bool { get set }
  • Defaults to 0.3. Only relevant if wantsAdditionalSoftwareDimming is YES. Especially for special use cases like airplane software that requires additional dimming.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        CGFloat additionalBrightnessDimmingFactor;

    Swift

    var additionalBrightnessDimmingFactor: CGFloat { get set }
  • Defaults to 0.6. If you set this to 1 the screen will be completely dark. Only relevant if wantsAdditionalSoftwareDimming is YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        CGFloat maximumAdditionalBrightnessDimmingFactor;

    Swift

    var maximumAdditionalBrightnessDimmingFactor: CGFloat { get set }
  • Controls how the idle timer (idleTimerDisabled) should be managed, or if you handle this manually. Defaults to PSPDFIdleTimerManagementManual.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        PSPDFIdleTimerManagement idleTimerManagement;

    Swift

    var idleTimerManagement: PSPDFIdleTimerManagement { get set }
  • Time in seconds in which the default idle time should be extended. Defaults to 10 * 60 = 10 minutes.

    Note

    Setting this will re-set the idle timer to the new time.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSTimeInterval extendedIdleTime;

    Swift

    var extendedIdleTime: TimeInterval { get set }
  • Brightness value 0..1. Takes additional software dimming into account. Supports KVO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat brightness;

    Swift

    var brightness: CGFloat { get set }