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.

Note

Use this class from the main thread only.
  • Attach a pdf controller to automatically start mirroring. 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(for screen: UIScreen) -> PSPDFViewController?
  • 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;

    Swift

    var externalScreensDisableScreenDimming: Bool { get set }
  • Delegate that calls back when mirroring is started or stopped.

    Declaration

    Objective-C

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

    Swift

    weak var delegate: PSPDFScreenControllerDelegate? { get set }