PSPDFScreenControllerDelegate

Undocumented

  • Started mirroring on screen.

    This delegate is called after the UIWindow has been created and the rootViewController is configured. Use this for additional customization.

    Note

    Replacing the rootViewController on the mirroring window is supported, as long as the PSPDFViewController is correctly registered as a child view controller.

    Use mirrorControllerForScreen: to access the window if required.

    Declaration

    Objective-C

    - (void)screenController:(nonnull PSPDFScreenController *)screenController
        didStartMirroringForScreen:(nonnull UIScreen *)screen;

    Swift

    optional func screenController(_ screenController: PSPDFScreenController, didStartMirroringForScreen screen: Any!)
  • Stopped mirroring on screen.

    This delegate is called after the mirroring window is hidden and is about to be deallocated.

    Declaration

    Objective-C

    - (void)screenController:(nonnull PSPDFScreenController *)screenController
        didStopMirroringForScreen:(nonnull UIScreen *)screen;

    Swift

    optional func screenController(_ screenController: PSPDFScreenController, didStopMirroringForScreen screen: Any!)
  • Implement this method to return a custom controller that should be used for mirroring. If you return a custom controller, ensure that it is configured correctly.

    This is called just before mirroring starts.

    Note

    The default implementation uses various sensible options such as hiding the thumbnail bar, document label, page label and using automatic page mode.

    Warning

    PSPDFPageTransitionScrollPerSpread is the only supported page mode for mirroring currently.

    Gallery considerations: We recommend at least following options to ensure the gallery works as expected: builder.allowPlayingMultipleInstances = YES; builder.usesExternalPlaybackWhileExternalScreenIsActive = NO; See galleryConfiguration on PSPDFConfiguration for details.

    Declaration

    Objective-C

    - (nonnull PSPDFViewController *)createPDFViewControllerForMirroring:
        (nonnull PSPDFScreenController *)screenController;

    Swift

    optional func createPDFViewController(forMirroring screenController: PSPDFScreenController) -> PSPDFViewController