PSPDFSpreadView
Objective-C
@interface PSPDFSpreadView : UIView <PSPDFOverridable>
Swift
class PDFSpreadView : UIView, Overridable
The spread view is responsible for laying out one or multiple page views.
It ensures the best display for the pages it is responsible for and makes sure pages are shown in the correct order (e.g. respecting the page binding).
A spread describes a collection of continuous pages that are grouped in a logical container from the layout. E.g. if you have a book, when the book is open you will always see two pages next to each other. These two pages build one spread. If you have a stack of loose paper on the other hand, you always only see one page, so a spread only consists of one page in that example.
-
Unavailable
Not the designated initializer
Undocumented
Declaration
Objective-C
PSPDF_INIT_WITH_CODER_UNAVAILABLE
-
The layout this spread view is a part of.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) PSPDFDocumentViewLayout *layout;
Swift
var layout: PSPDFDocumentViewLayout? { get }
-
The spread represented by this view.
To convert the spread index to the range of pages that it represents, use the methods provided by the layout.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger spreadIndex;
Swift
var spreadIndex: Int { get }
-
The page views maintained by this spread view.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSArray<PSPDFPageView *> *_Nonnull pageViews;
Swift
var pageViews: [PSPDFPageView] { get }
-
Iterates through
pageViews
to find the page view forpageIndex
.Declaration
Objective-C
- (nullable PSPDFPageView *)pageViewForPageAtIndex:(PSPDFPageIndex)pageIndex;
Swift
func pageViewForPage(at pageIndex: PageIndex) -> PSPDFPageView?
Parameters
pageIndex
The index of the page for which the page view is required.
Return Value
The
PDFPageView
displaying the page atpageIndex
.