PTDocumentOptions
@interface PTDocumentOptions : NSObject <NSCopying>
Options to be used when opening or accessing a document.
-
Initializes a newly created
PTDocumentOptions
instance.Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
Return Value
an initialized
PTDocumentOptions
instance -
Initializes a newly created
PTDocumentOptions
instance with an existing instance.Declaration
Objective-C
- (nonnull instancetype)initWithOptions:(nonnull PTDocumentOptions *)options;
Swift
init(options: PTDocumentOptions)
Parameters
options
the existing options instance
Return Value
an initialized
PTDocumentOptions
instance -
A convenience method that creates and initializes a new
PTDocumentOptions
instance.Declaration
Objective-C
+ (nonnull instancetype)options;
Return Value
a new
PTDocumentOptions
instance. -
The password to be used when opening the document.
The default value of this property is
nil
.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *password;
Swift
var password: String? { get set }
-
The page number to which the document should be opened when it is opened for the first time. The value of this property must be greater than zero.
The last-read page number of previously-opened documents will take priority over this setting.
The default value of this property is
1
.Declaration
Objective-C
@property (nonatomic) NSUInteger initialPageNumber;
Swift
var initialPageNumber: UInt { get set }
-
The file path extension to be used for the source document. When set, the value of this property takes precedence over the file path extension of the source file path, if any.
This property can be used to override the inherent file path extension of the source file path in the case where the inherent extension is incorrect, or to provide an extension when it is missing.
The default value of this property is
nil
.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *sourcePathExtension;
Swift
var sourcePathExtension: String? { get set }
-
Whether an experimental file coordination system should be used.
File coordination is used to respond to external changes to a file (modification, moving, deletion, etc.).
The default value of this property is
NO
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isExperimentalFileCoordinationEnabled) BOOL experimentalFileCoordinationEnabled;
Swift
var isExperimentalFileCoordinationEnabled: Bool { get set }
-
Returns a Boolean value that indicates whether the receiver and the given
options
are equal.Declaration
Objective-C
- (BOOL)isEqualToOptions:(nullable PTDocumentOptions *)options;
Swift
func isEqual(to options: PTDocumentOptions?) -> Bool
Parameters
options
The options to be compared to the receiver. May be
nil
, in which case this method returnsNO
.Return Value
YES
if the receiver andoptions
are equal, otherwiseNO
.