PSPDFDocumentSharingCoordinator


@interface PSPDFDocumentSharingCoordinator
    : NSObject <PSPDFDocumentSharingViewControllerDelegate>

A document sharing coordinator represents a document action. This is an abstract class - see concrete implementations such as PSPDFMailCoordinator or PSPDFPrintCoordinator.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Initialize with the documents.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocuments:
        (nonnull NSArray<PSPDFDocument *> *)documents;

    Swift

    init(documents: [PSPDFDocument])
  • The documents this coordinator operates on.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<PSPDFDocument *> *_Nonnull documents;

    Swift

    var documents: [PSPDFDocument] { get }
  • Pages that should be offered for the sharing.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSIndexSet *visiblePageIndexes;

    Swift

    var visiblePageIndexes: IndexSet? { get set }
  • Attached delegate.

    Declaration

    Objective-C

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

    Swift

    weak var delegate: PSPDFDocumentSharingCoordinatorDelegate? { get set }
  • Defines what sharing options should be displayed.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        PSPDFDocumentSharingOptions sharingOptions;

    Swift

    var sharingOptions: PSPDFDocumentSharingOptions { get set }
  • Checks if the action can be performed.

    Declaration

    Objective-C

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

    Swift

    var isAvailable: Bool { get }
  • Indicates that a background operation is running.

    Declaration

    Objective-C

    @property (readonly, getter=isExecuting, atomic) BOOL executing;

    Swift

    var isExecuting: Bool { get }
  • Presents the view controller to targetController.

    Note

    Might work on a background thread to crunch the document before presenting the final view controller.

    Declaration

    Objective-C

    - (void)presentToViewController:
                (nullable 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 & PSPDFPresentationActions)?, options: [String : Any]? = nil, sender: Any?, animated: Bool, completion: (() -> Void)? = nil)