PSPDFScreenController


@interface PSPDFScreenController : NSObject

The screen controller will automatically watch for connected screens

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 (assign, readwrite, 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(forScreen screen: Any!) -> PSPDFViewController?
  • Delegate that calls back when mirroring is started or stopped.

    Note

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

    Declaration

    Objective-C

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

    Swift

    weak var delegate: PSPDFScreenControllerDelegate? { get set }
  • Controls if the screen should dim after a certain time or if it should stay lighten up, when an external monitor is connected. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        BOOL externalScreensDisableScreenDimming;