PSPDFViewModePresenter

@protocol PSPDFViewModePresenter <NSObject>

Protocol for presenting a collection view with customization options.

  • Convenience initializer. - parameter: layout The layout to use when loading the collection view. - note: If nil, a controller specific default layout is selected.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCollectionViewLayout:
        (nullable UICollectionViewLayout *)layout;

    Swift

    init(collectionViewLayout layout: Any!)

    Parameters

    layout

    The layout to use when loading the collection view.

  • Convenience initializer. Initializes the controller with the default layout and stores the document.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocument:(nullable PSPDFDocument *)document;

    Swift

    init(document: PSPDFDocument?)
  • Class used for thumbnails. - warning: Will be ignored if the layout is not a flow layout or a subclass thereof.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) Class _Nonnull cellClass;

    Swift

    var cellClass: AnyClass { get set }
  • A Boolean value specifying whether the thumbnails should be displayed in consistently spaced columns, or with consistent areas. For documents where all pages are the same size, this setting has no effect. If YES, thumbnails are laid out in columns. Landscape pages will be smaller than portrait pages. This tends to look better. If NO, all thumbnails have approximatly the same area. Defaults to YES.

    Declaration

    Objective-C

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

    Swift

    var fixedItemSizeEnabled: Bool { get set }
  • Adjusts the contentInset and scrollIndicatorInsets of the collectionView based on a bar that overlaps it by the specified height.

    Declaration

    Objective-C

    - (void)updateInsetsForTopOverlapHeight:(CGFloat)overlapHeight;

    Swift

    func updateInsets(forTopOverlapHeight overlapHeight: CGFloat)