PSPDFNewPageViewControllerDataSource

@protocol PSPDFNewPageViewControllerDataSource<NSObject, PSPDFOverridable>

@optional
/**
 Optional method. Called when the new page view controller is being configured.

 The return value of this method's implementation is used to determine the correct
 title for the "Add page" button on the `PSPDFNewPageViewController` instance.

 @param controller  The controller that's calling this method.

 @return Integer with the index of the first item that's selected and will serve as insertion point reference. If no index is selected, return `NSNotFound`. If this method is not implemented, `NSNotFound` is used.
 */
- (PSPDFPageIndex)selectedIndexForNewPageViewController:(PSPDFNewPageViewController *)controller;

@end

Undocumented

  • Optional method. Called when the new page view controller is being configured.

    The return value of this method’s implementation is used to determine the correct title for the Add page button on the PSPDFNewPageViewController instance.

    Declaration

    Objective-C

    - (PSPDFPageIndex)selectedIndexForNewPageViewController:
        (nonnull PSPDFNewPageViewController *)controller;

    Swift

    optional func selectedIndex(for controller: PSPDFNewPageViewController) -> PageIndex

    Parameters

    controller

    The controller that’s calling this method.

    Return Value

    Integer with the index of the first item that’s selected and will serve as insertion point reference. If no index is selected, return NSNotFound. If this method is not implemented, NSNotFound is used.