PSPDFScreenController

Objective-C


@interface PSPDFScreenController : NSObject

Swift

class ScreenController : NSObject

The screen controller will automatically watch for connected screens and external scenes if the property pdfControllerToMirror is set, and will release such mirrors once this property has been set to nil.

UIWindow objects are automatically created for each connected screen, and destroyed once a screen is disconnected or pdfControllerToMirror is set to nil.

Note

Use this class from the main thread only.
  • Attach a pdf controller to automatically start mirroring. Set to nil to stop mirroring again. View position is kept automatically in sync.

    Note

    This should be the controller you show on the device. This class will automatically create a managed copy and mirrors the position.

    Declaration

    Objective-C

    @property (nonatomic, nullable) PSPDFViewController *pdfControllerToMirror;

    Swift

    var pdfControllerToMirror: PSPDFViewController? { get set }
  • Returns the view controller for screen if mirrored.

    Declaration

    Objective-C

    - (nullable PSPDFViewController *)mirrorControllerForScreen:
        (nonnull UIScreen *)screen;

    Swift

    func mirrorController(for screen: UIScreen) -> PSPDFViewController?
  • Delegate that calls back when mirroring is started or stopped.

    Note

    This delegate is not used by PSPDFKit and can be used freely to customize the screen mirroring

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PSPDFScreenControllerDelegate> _Nullable delegate;

    Swift

    weak var delegate: ScreenControllerDelegate? { get set }