PTToolsSettingsManager
@interface PTToolsSettingsManager : NSObject
A class that manages user preferences.
The settings in this class are use by the PTDocumentBaseViewController to control its behaviour, except as noted in the documentation for each setting.
-
The global instance of the shared tools settings manager.
Declaration
Objective-C
@property (class, nonatomic, strong, readonly) PTToolsSettingsManager *_Nonnull sharedManager;Swift
class var shared: PTToolsSettingsManager { get } -
The default settings. These are the values that are contained in the settings plist file,
PTToolsSettings.plist, not necessarily the current values.Declaration
Objective-C
@property (nonatomic, retain, readonly) NSArray<NSDictionary<NSString *, id> *> *_Nonnull toolsDefaultSettings;Swift
var toolsDefaultSettings: [[String : Any]] { get } -
The default Apple Pencil settings. These are the values that are contained in the settings plist file,
PTApplePencilSettings.plist, not necessarily the current values.Declaration
Objective-C
@property (nonatomic, retain, readonly) NSArray<NSDictionary<NSString *, id> *> *_Nonnull applePencilDefaultSettings;Swift
var applePencilDefaultSettings: [[String : Any]] { get } -
Returns the default settings for a given settings plist file. These are the values that are contained in the plist file, not necessarily the current values.
Declaration
Objective-C
- (nonnull NSArray<NSDictionary<NSString *, id> *> *) defaultSettingsForPlistName:(nonnull NSString *)plistName;Swift
func defaultSettings(forPlistName plistName: String) -> [[String : Any]] -
Determines if freehand annotation tool is shown in the main toolbar.
Default is true.
Declaration
Objective-C
@property (nonatomic) BOOL showInkInMainToolbar;Swift
var showInkInMainToolbar: Bool { get set } -
Determines if the text search tool is shown in the main toolbar.
Default is true on iPad, false on iPhone.
Declaration
Objective-C
@property (nonatomic) BOOL showTextSearchInMainToolbar;Swift
var showTextSearchInMainToolbar: Bool { get set } -
Determines if shape annotations are automatically selected after the user creates them.
Default is true.
Declaration
Objective-C
@property (nonatomic) BOOL selectAnnotationAfterCreation;Swift
var selectAnnotationAfterCreation: Bool { get set } -
Determines if tabs for documents are enabled in the viewer.
Default is true.
Note
this setting is not used by thePTTabbedDocumentViewController, and should instead be read and acted upon by the app itself.Declaration
Objective-C
@property (nonatomic) BOOL tabsEnabled;Swift
var tabsEnabled: Bool { get set } -
Determines if the toolbars should be hidden automatically after 5 seconds.
Default is false.
Declaration
Objective-C
@property (nonatomic) BOOL automaticallyHideToolbars;Swift
var automaticallyHideToolbars: Bool { get set } -
Determines if PDFTron should execute any JavaScript contained in a PDF.
Default is true.
Declaration
Objective-C
@property (nonatomic) BOOL javascriptEnabled;Swift
var javascriptEnabled: Bool { get set } -
Determines if PDFTron should use color management to render PDFs.
Default is true.
Declaration
Objective-C
@property (nonatomic) BOOL colorManagementEnabled;Swift
var colorManagementEnabled: Bool { get set } -
Determines if an Apple Pencil should immediately draw ink (as opposed to function like a finger touch).
Default is true.
Declaration
Objective-C
@property (nonatomic) BOOL applePencilDrawsInk;Swift
var applePencilDrawsInk: Bool { get set } -
Determines if highlight-only annotations created using PencilKit use a multiply blend mode.
Default is true.
Declaration
Objective-C
@property (nonatomic) BOOL pencilHighlightMultiplyBlendModeEnabled;Swift
var pencilHighlightMultiplyBlendModeEnabled: Bool { get set } -
Determines if the device should be stopped from dimming when a document is displayed. Default is false.
Note
this setting is not used by thePTDocumentViewController, and should instead be read and acted upon by the app itself.Declaration
Objective-C
@property (nonatomic) BOOL stopScreenFromDimming;Swift
var stopScreenFromDimming: Bool { get set } -
Determines if the navigation history user interface should be shown when applicable.
The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic) BOOL navigationHistoryEnabled;Swift
var navigationHistoryEnabled: Bool { get set } -
Determines if the viewer settings should show an option to turn on Right to Left language viewing.
Default is
falsewhenUIApplication.sharedApplication.userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft; `true otherwise.Declaration
Objective-C
@property (nonatomic) BOOL showRightToLeftViewerSetting;Swift
var showRightToLeftViewerSetting: Bool { get set } -
Determines whether only Pencil touches should be used for annotating.
Default is
PTPencilInteractionModeSystem.Declaration
Objective-C
@property (nonatomic) PTPencilInteractionMode pencilInteractionMode;Swift
var pencilInteractionMode: PTPencilInteractionMode { get set } -
Returns the boolean value for a given setting key value.
Declaration
Objective-C
- (BOOL)boolForKey:(nonnull NSString *)key;Swift
func bool(forKey key: String) -> Bool -
Sets the boolean value for a given setting key value.
Declaration
Objective-C
- (void)setBool:(BOOL)value forKey:(nonnull NSString *)key;Swift
func setBool(_ value: Bool, forKey key: String) -
Returns the integer value for a given setting key value.
Declaration
Objective-C
- (NSInteger)integerForKey:(nonnull NSString *)key;Swift
func integer(forKey key: String) -> Int -
Sets the integer value for a given setting key value.
Declaration
Objective-C
- (void)setInteger:(NSInteger)integer forKey:(nonnull NSString *)key;Swift
func setInteger(_ integer: Int, forKey key: String)
PTToolsSettingsManager Class Reference