PSPDFDocumentInfoCoordinator

Objective-C


@interface PSPDFDocumentInfoCoordinator : NSObject <PSPDFOverridable>

Swift

class DocumentInfoCoordinator : NSObject, Overridable

Coordinates a common view controller for document metadata, such as outline, bookmarks or annotations.

  • Builds and returns the document info view controller.

    Declaration

    Objective-C

    - (nullable UIViewController *)documentInfoViewController;

    Swift

    func documentInfoViewController() -> UIViewController?
  • Present view controller on targetController.

    Note

    The completion block will not be called if there’s another view controller presented on targetController.

    Declaration

    Objective-C

    - (nullable UIViewController *)
        presentToViewController:
            (nonnull UIViewController<PSPDFPresentationActions> *)targetController
                        options:(nullable NSDictionary<NSString *, id> *)options
                         sender:(nullable id)sender
                       animated:(BOOL)animated
                     completion:(nullable void (^)(void))completion;

    Swift

    func present(to targetController: UIViewController & PresentationActions, options: [String : Any]? = nil, sender: Any?, animated: Bool, completion: (() -> Void)? = nil) -> UIViewController?
  • Checks if there’s data to present.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isAvailable) BOOL available;

    Swift

    var isAvailable: Bool { get }
  • The document attached to the document info coordinator.

    Declaration

    Objective-C

    @property (nonatomic, nullable) PSPDFDocument *document;

    Swift

    var document: PSPDFDocument? { get set }
  • This protocol inherits from PSPDFOverridable since it’s also used to fetch subclasses.

    Declaration

    Objective-C

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

    Swift

    weak var delegate: PSPDFDocumentInfoCoordinatorDelegate? { get set }
  • Choose the controller type. Defaults to PSPDFDocumentInfoOptionOutline, PSPDFDocumentInfoOptionAnnotations, PSPDFDocumentInfoOptionBookmarks, PSPDFDocumentInfoOptionEmbeddedFiles, PSPDFDocumentInfoOptionDocumentInfo, PSPDFDocumentInfoOptionSecurity.

    Note

    Change this before the controller is being displayed.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSArray<PSPDFDocumentInfoOption> *_Nonnull availableControllerOptions;

    Swift

    var availableControllerOptions: [DocumentInfoOption] { get set }
  • Called after a controller has been created. Set a block to allow custom modifications. This sets the delegate of the controllers by default. If you set a custom block, ensure to call the previous implementation.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^) (UIViewController *_Nonnull, PSPDFDocumentInfoOption _Nonnull) didCreateControllerBlock;

    Swift

    var didCreateControllerBlock: ((UIViewController, DocumentInfoOption) -> Void)? { get set }