PSPDFDocumentPickerControllerDelegate

Objective-C

@protocol PSPDFDocumentPickerControllerDelegate <NSObject>

Swift

protocol PDFDocumentPickerControllerDelegate : NSObjectProtocol

Document selector delegate.

  • Called when a document cell has been selected in the document picker.

    Declaration

    Objective-C

    - (void)documentPickerController:
                (nonnull PSPDFDocumentPickerController *)controller
                   didSelectDocument:(nonnull PSPDFDocument *)document
                           pageIndex:(PSPDFPageIndex)pageIndex
                        searchString:(nullable NSString *)searchString;

    Swift

    func documentPickerController(_ controller: PDFDocumentPickerController, didSelect document: PSPDFDocument, pageIndex: PageIndex, search searchString: String?)

    Parameters

    controller

    The document picker controller where the selection happened.

    document

    The document that has been selected.

    pageIndex

    Is usually 0, unless a search result from the FTS engine, that points to a specific page, was tapped.

    searchString

    The search term that was entered while this document has been selected. Will be nil if search was not active.

  • Called right before search begins.

    Declaration

    Objective-C

    - (void)documentPickerControllerWillBeginSearch:
        (nonnull PSPDFDocumentPickerController *)controller;

    Swift

    optional func documentPickerControllerWillBeginSearch(_ controller: PDFDocumentPickerController)
  • Called when search did begin.

    Declaration

    Objective-C

    - (void)documentPickerControllerDidBeginSearch:
        (nonnull PSPDFDocumentPickerController *)controller;

    Swift

    optional func documentPickerControllerDidBeginSearch(_ controller: PDFDocumentPickerController)
  • Called right before search ends.

    Declaration

    Objective-C

    - (void)documentPickerControllerWillEndSearch:
        (nonnull PSPDFDocumentPickerController *)controller;

    Swift

    optional func documentPickerControllerWillEndSearch(_ controller: PDFDocumentPickerController)
  • Called when search did end.

    Declaration

    Objective-C

    - (void)documentPickerControllerDidEndSearch:
        (nonnull PSPDFDocumentPickerController *)controller;

    Swift

    optional func documentPickerControllerDidEndSearch(_ controller: PDFDocumentPickerController)