Disabling Directional Lock When Scrolling

By default, scroll views inside the document view might have their scrolling direction locked so that it’s easier to swipe between spreads and pages. The direction becomes locked after you slowly scroll a zoomed in page in horizontal or vertical direction.

You can customize this behavior by setting the documentViewLayoutDirectionalLock configuration option to .NO. This will disable directional lock and allow you to scroll in all directions at all times.

let configuration = PDFConfiguration { builder in
    /* ... */
    builder.documentViewLayoutDirectionalLock = .NO
PSPDFConfiguration *configuration = [PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
    /* ... */
    builder.documentViewLayoutDirectionalLock = PSPDFAdaptiveConditionalNO;

Check out our guides on the document view hierarchy and handling user interactions to learn more about customizing the way users can interact with documents.