PSPDFControllerStateHandling

@protocol PSPDFControllerStateHandling <NSObject>

Handles state changes for a given document.

  • The document that this controller state is about.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) PSPDFDocument *_Nullable document;

    Swift

    weak var document: PSPDFDocument? { get set }
  • Updates the controller state to the passed in one.

    Declaration

    Objective-C

    - (void)setControllerState:(PSPDFControllerState)state
                         error:(nullable NSError *)error
                      animated:(BOOL)animated;

    Swift

    func setControllerState(_ state: PSPDFControllerState, error: Error?, animated: Bool)

    Parameters

    state

    The state to update to.

    error

    If the state is PSPDFControllerStateError, this contains the underlying error.

    animated

    If YES the controller state change should be animated in the UI.