PSPDFAppearanceModeManager

Objective-C


@interface PSPDFAppearanceModeManager : NSObject <PSPDFOverridable>

Swift

class PDFAppearanceModeManager : NSObject, Overridable

Coordinates appearance mode changes.

This class will only update the PDF page rendering style. Any UI appearance changes should be instead handled by the host application via the delegate methods this class offers.

  • The currently selected appearance mode. Defaults to PSPDFAppearanceModeDefault.

    Declaration

    Objective-C

    @property (nonatomic) PSPDFAppearanceMode appearanceMode;

    Swift

    var appearanceMode: PDFAppearanceMode { get set }
  • Deprecated

    Deprecated in PSPDFKit 10.5 for iOS. The animated parameter is not relevant on iOS 13 and later. Use the variable appearanceMode instead.

    Sets the appearance mode.

    Declaration

    Objective-C

    - (void)setAppearanceMode:(PSPDFAppearanceMode)appearanceMode
                     animated:(BOOL)animated;

    Swift

    func setAppearanceMode(_ appearanceMode: PDFAppearanceMode, animated: Bool)

    Parameters

    appearanceMode

    The new mode to apply.

    animated

    Fades any theme changes if set to true. This parameter is not relevant on iOS 13 and later.

  • The appearance delegate. Can be used to customize the default behaviors for each mode.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PSPDFAppearanceModeManagerDelegate> _Nullable delegate;

    Swift

    weak var delegate: AppearanceModeManagerDelegate? { get set }