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
PTDocumentViewState
instance.Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
Return Value
an initialized
PTDocumentViewState
instance -
Initializes a newly created
PTDocumentViewState
instance with an existing instance.Declaration
Objective-C
- (nonnull instancetype)initWithDocumentViewState: (nonnull PTDocumentViewState *)documentViewState;
Swift
init(documentViewState: PTDocumentViewState)
Parameters
documentViewState
The existing instance
Return Value
an initialized
PTDocumentViewState
instance -
Initializes a newly created
PTDocumentViewState
instance with the specified coder.Declaration
Objective-C
- (nonnull instancetype)initWithCoder:(nonnull NSCoder *)coder;
Swift
init(coder: NSCoder)
Parameters
coder
The coder
Return Value
an initialized
PTDocumentViewState
instance -
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 }