PTToolsUtil
@interface PTToolsUtil : NSObject
Utility methods for the Tools framework.
-
Returns an image in the tools bundle, regardless of extension.
Declaration
Objective-C
+ (nullable UIImage *)toolImageNamed:(nonnull NSString *)name;Swift
class func toolImageNamed(_ name: String) -> UIImage?Parameters
nameThe name of the image, with or without an extension.
Return Value
A UIImage created from the named file.
-
Returns an image in the tools bundle, regardless of extension.
Declaration
Objective-C
+ (nullable UIImage *)toolImageNamed:(nonnull NSString *)name inverted:(BOOL)inverted;Swift
class func toolImageNamed(_ name: String, inverted: Bool) -> UIImage?Parameters
nameThe name of the image, with or without an extension.
invertedIf true, returns a color-inverted version of the image
Return Value
A UIImage created from the named file.
-
Reset settings to defaults.
Declaration
Objective-C
+ (void)resetSettings;Swift
class func resetSettings() -
Returns the tool image for an annotation type.
Declaration
Objective-C
+ (nullable UIImage *)imageForAnnotationType: (PTExtendedAnnotType)annotationType;Swift
class func image(forAnnotationType annotationType: PTExtendedAnnotType) -> UIImage? -
The Tools framework bundle.
Declaration
Objective-C
@property (class, nonatomic, readonly) NSBundle *_Nonnull toolsBundle;Swift
class var toolsBundle: Bundle { get } -
The directory URL for Tools-specific saved resources, data and configuration files, etc.
Declaration
Objective-C
@property (class, nonatomic, readonly, nullable) NSURL *toolsResourcesDirectoryURL;Swift
class var toolsResourcesDirectoryURL: URL? { get }
PTToolsUtil Class Reference