PTDocumentViewState
@interface PTDocumentViewState : NSObject <NSCoding, NSSecureCoding, NSCopying>
A model class used to represent the state of a document in a viewer.
-
Initializes a newly created
PTDocumentViewStateinstance.Declaration
Objective-C
- (nonnull instancetype)init;Swift
init()Return Value
an initialized
PTDocumentViewStateinstance -
Initializes a newly created
PTDocumentViewStateinstance with an existing instance.Declaration
Objective-C
- (nonnull instancetype)initWithDocumentViewState: (nonnull PTDocumentViewState *)documentViewState;Swift
init(documentViewState: PTDocumentViewState)Parameters
documentViewStateThe existing instance
Return Value
an initialized
PTDocumentViewStateinstance -
Initializes a newly created
PTDocumentViewStateinstance with the specified coder.Declaration
Objective-C
- (nonnull instancetype)initWithCoder:(nonnull NSCoder *)coder;Swift
init(coder: NSCoder)Parameters
coderThe coder
Return Value
an initialized
PTDocumentViewStateinstance -
The number of the viewer’s current page.
The default value of this property is
0.Declaration
Objective-C
@property (nonatomic) int pageNumber;Swift
var pageNumber: Int32 { get set } -
The current zoom level of the viewer.
The default value of this property is
1.0.Declaration
Objective-C
@property (nonatomic) double zoom;Swift
var zoom: Double { get set } -
The page presentation mode. This can be used to determine how to interpret the viewport rect.
The default value of this property is
e_ptsingle_page.Declaration
Objective-C
@property (nonatomic) PTPagePresentationMode pagePresentationMode;Swift
var pagePresentationMode: PTPagePresentationMode { get set }
PTDocumentViewState Class Reference