PSPDFDocumentInfoCoordinator


@interface PSPDFDocumentInfoCoordinator : NSObject

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

  • Present view controller 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(toViewController targetController: Any!, options: [String : Any]? = nil, sender: Any?, animated: Bool, completion: (() -> Void)? = nil) -> Any!
  • Checks if there’s data to present.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) PSPDFDocument *document;

    Swift

    var document: PSPDFDocument? { get set }
  • Delegate to fetch subclasses.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<PSPDFOverridable> _Nullable delegate;

    Swift

    weak var delegate: PSPDFOverridable? { get set }
  • Choose the controller type. Defaults to PSPDFDocumentInfoOptionOutline, PSPDFDocumentInfoOptionAnnotations, PSPDFDocumentInfoOptionBookmarks, PSPDFDocumentInfoOptionEmbeddedFiles. - note: Change this before the controller is being displayed.

    Declaration

    Objective-C

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

    Swift

    var availableControllerOptions: [PSPDFDocumentInfoOption] { 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 (readwrite, copy, nonatomic, nullable) void (^)
        (UIViewController *_Nonnull, PSPDFDocumentInfoOption _Nonnull)
            didCreateControllerBlock;

    Swift

    var didCreateControllerBlock: ((NSViewController, PSPDFDocumentInfoOption) -> Void)? { get set }