summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-10-01 14:27:47 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-10-01 16:20:05 -0700
commit7087a4c55adf3fd47f3bd6bac7adf432866edfcd (patch)
treef8b574182c95129edb6c3c6434a0777a87286eaf /include
parenta0244601ca4f94b5002cb0b14836bec1950b1644 (diff)
downloadqtlocation-mapboxgl-7087a4c55adf3fd47f3bd6bac7adf432866edfcd.tar.gz
[ios] fixes #2491: document MGLAnnotationImage
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLAnnotationImage.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/mbgl/ios/MGLAnnotationImage.h b/include/mbgl/ios/MGLAnnotationImage.h
index 9707fca8f8..44d17087bc 100644
--- a/include/mbgl/ios/MGLAnnotationImage.h
+++ b/include/mbgl/ios/MGLAnnotationImage.h
@@ -4,13 +4,29 @@
NS_ASSUME_NONNULL_BEGIN
+/** The MGLAnnotationImage class is responsible for presenting point-based annotations visually on a map view. Annotation image objects wrap `UIImage` objects and may be recycled later and put into a reuse queue that is maintained by the map view. */
@interface MGLAnnotationImage : NSObject
-@property (nonatomic, readonly) UIImage *image;
-@property (nonatomic, readonly) NSString *reuseIdentifier;
+/** @name Initializing and Preparing the Image Object */
+/** Initializes and returns a new annotation image object.
+* @param image The image to be displayed for the annotation.
+* @param reuseIdentifier The string that identifies that this annotation image is reusable.
+* @return The initialized annotation image object or `nil` if there was a problem initializing the object. */
+ (instancetype)annotationImageWithImage:(UIImage *)image reuseIdentifier:(NSString *)reuseIdentifier;
+/** @name Getting and Setting Attributes */
+
+/** The image to be displayed for the annotation. */
+@property (nonatomic, readonly) UIImage *image;
+
+/** The string that identifies that this annotation image is reusable. (read-only)
+*
+* You specify the reuse identifier when you create the image object. You use this type later to retrieve an annotation image object that was created previously but which is currently unused because its annotation is not on screen.
+*
+* If you define distinctly different types of annotations (with distinctly different annotation images to go with them), you can differentiate between the annotation types by specifying different reuse identifiers for each one. */
+@property (nonatomic, readonly) NSString *reuseIdentifier;
+
@end
NS_ASSUME_NONNULL_END