PSPDFInstantViewController


@interface PSPDFInstantViewController

A specialized variant of PSPDFViewController that supports annotation synchronization.

Showing a document managed by Instant in any other view controller is not supported.

  • Whether the view controller should listen for server changes when visible.

    When YES, the view controller will take care of subscribing to and unsubscribing from live changes from the server when it is moved on or off screen. Note that setting this value to NO does not mean that you will not receive any changes from the server: Whenever a PSPDFInstantDocumentDescriptor is being synced, all of the related documents are updated automatically. So if, for example, you display a secondary PSPDFInstantViewController on an external display, while you are editing in a primary PSPDFInstantViewController, that secondary view controller will be updated even if it has shouldListenForChangesWhenVisible set to NO.

    The default value of this property is YES.

    Declaration

    Objective-C

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

    Swift

    var shouldListenForChangesWhenVisible: Bool { get set }
  • Triggers a one-shot sync action.

    When the document isn’t Instant enabled, or already syncing, this method does nothing. Otherwise, it triggers a one- time sync action. This is useful when you don’t want automatic syncing to reduce the energy footprint of your app.

    Declaration

    Objective-C

    - (void)syncChanges:(nonnull id)sender;

    Swift

    @IBAction func syncChanges(_ sender: Any)