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 saveStylePresets was 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

    annotType

    The 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

    annotType

    The annotation type for which the default style should be returned.

    index

    The 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) -> PTAnnotationStylePresetsGroup

    Parameters

    annotType

    The 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?) -> PTAnnotationStylePresetsGroup

    Parameters

    annotType

    The annotation type for which the annotation style preset group should be returned.

    identifier

    The 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

    annotType

    The 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

    annotType

    The annotation type for which the annotation style preset group should be returned.

    identifier

    The 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()