PTAnnotationStyleManager
@interface PTAnnotationStyleManager : NSObject <PTOverridable>
Manages the saved annotation style presets
-
The manager singleton
Declaration
Objective-C
@property (class, nonatomic, strong, readonly) PTAnnotationStyleManager *_Nonnull defaultManager;Swift
class var `default`: PTAnnotationStyleManager { get } -
The date when
saveStylePresetswas last called. Default is null.Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) NSDate *lastSaveDate;Swift
var lastSaveDate: Date? { get } -
Retrieves the default style dictionary for the given annotation type.
Declaration
Objective-C
+ (nullable NSDictionary *)styleDefaultForAnnotationType: (PTExtendedAnnotType)annotType;Swift
class func styleDefault(forAnnotationType annotType: PTExtendedAnnotType) -> [AnyHashable : Any]?Parameters
annotTypeThe annotation type for which the default style should be returned.
-
Retrieves the default style dictionary for the given annotation type.
Declaration
Objective-C
+ (nullable NSDictionary *)styleDefaultForAnnotationType: (PTExtendedAnnotType)annotType presetIndex:(int)index;Swift
class func styleDefault(forAnnotationType annotType: PTExtendedAnnotType, presetIndex index: Int32) -> [AnyHashable : Any]?Parameters
annotTypeThe annotation type for which the default style should be returned.
indexThe preset index.
-
Retrieves the annotation style preset group for the given annotation type.
Declaration
Objective-C
- (nonnull PTAnnotationStylePresetsGroup *)stylePresetsForAnnotationType: (PTExtendedAnnotType)annotType;Swift
func stylePresets(forAnnotationType annotType: PTExtendedAnnotType) -> PTAnnotationStylePresetsGroupParameters
annotTypeThe annotation type for which the annotation style preset group should be returned.
-
Retrieves the annotation style preset group for the given annotation type and unique preset group ID.
Declaration
Objective-C
- (nonnull PTAnnotationStylePresetsGroup *) stylePresetsForAnnotationType:(PTExtendedAnnotType)annotType identifier:(nullable NSString *)identifier;Swift
func stylePresets(forAnnotationType annotType: PTExtendedAnnotType, identifier: String?) -> PTAnnotationStylePresetsGroupParameters
annotTypeThe annotation type for which the annotation style preset group should be returned.
identifierThe unique ID of the preset group.
-
Sets the annotation style preset group for the given annotation type.
Declaration
Objective-C
- (void)setStylePresets:(nonnull PTAnnotationStylePresetsGroup *)stylePresets forAnnotationType:(PTExtendedAnnotType)annotType;Swift
func setStylePresets(_ stylePresets: PTAnnotationStylePresetsGroup, forAnnotationType annotType: PTExtendedAnnotType)Parameters
annotTypeThe annotation type for which the annotation style preset group should be returned.
-
Sets the annotation style preset group for the given annotation type and unique preset group ID.
Declaration
Objective-C
- (void)setStylePresets:(nonnull PTAnnotationStylePresetsGroup *)stylePresets forAnnotationType:(PTExtendedAnnotType)annotType identifier:(nullable NSString *)identifier;Swift
func setStylePresets(_ stylePresets: PTAnnotationStylePresetsGroup, forAnnotationType annotType: PTExtendedAnnotType, identifier: String?)Parameters
annotTypeThe annotation type for which the annotation style preset group should be returned.
identifierThe unique ID of the preset group.
-
Saves the current preset style groups to disk.
Declaration
Objective-C
- (void)saveStylePresets;Swift
func saveStylePresets() -
Deletes the saved preset style groups from disk.
Declaration
Objective-C
- (void)deleteSavedStylePresets;Swift
func deleteSavedStylePresets()
PTAnnotationStyleManager Class Reference