summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLAnnotationView.h
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-05-13 12:58:28 -0700
committerJesse Bounds <jesse@rebounds.net>2016-05-13 15:53:04 -0700
commit1ee14915f8484f22abb59b7ecdb48e197e6dbf38 (patch)
tree6b5d39dcc396f5d383e0c356078a12af5e9f2022 /platform/ios/src/MGLAnnotationView.h
parentfb759e8475906aa6ff6c8aa035446d801216beaf (diff)
downloadqtlocation-mapboxgl-1ee14915f8484f22abb59b7ecdb48e197e6dbf38.tar.gz
[ios] Add method documentation for view based annotations.
Diffstat (limited to 'platform/ios/src/MGLAnnotationView.h')
-rw-r--r--platform/ios/src/MGLAnnotationView.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h
index 475d9aa758..bc2494e9fc 100644
--- a/platform/ios/src/MGLAnnotationView.h
+++ b/platform/ios/src/MGLAnnotationView.h
@@ -4,15 +4,35 @@
NS_ASSUME_NONNULL_BEGIN
+/** The MGLAnnotationView class is responsible for representing point-based annotation markers as a view. Annotation views represent an annotation object, which is an object that corresponds to the MGLAnnotation protocol. When an annotation’s coordinate point is visible on the map view, the map view delegate is asked to provide a corresponding annotation view. If an annotation view is created with a reuse identifier, the map view may recycle the view when it goes offscreen. */
@interface MGLAnnotationView : UIView
+/**
+ Initializes and returns a new annotation view object.
+
+ @param reuseIdentifier The string that identifies that this annotation view is reusable.
+ @return The initialized annotation view object or `nil` if there was a problem initializing the object.
+ */
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier;
/**
The string that identifies that this annotation view is reusable. (read-only)
+
+ You specify the reuse identifier when you create the view. You use the identifier later to retrieve an annotation view 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 views to go with them), you can
+ differentiate between the annotation types by specifying different reuse identifiers for each one.
*/
@property (nonatomic, readonly, nullable) NSString *reuseIdentifier;
+
+/**
+ Called when the view is removed from the reuse queue.
+
+ The default implementation of this method does nothing. You can override it in your custom annotation views and use it to put the view
+ in a known state before it is returned to your map view delegate.
+ */
- (void)prepareForReuse;
@end