TTAnnotationDelegate
Objective-C
@protocol TTAnnotationDelegate <NSObject>
Swift
protocol TTAnnotationDelegate : NSObjectProtocol
TTAnnotationDelegate uses methods to annotation and overlay views to manage interactions with those views.
-
Called when one of annotation on the map is selected
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager annotationSelected:(TTAnnotation *_Nonnull)annotation;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, annotationSelected annotation: TTAnnotation)
Parameters
manager
TTAnnotationManager
annotation
TTAnnotation
-
Called when selected annotation was deselected by selecting another or by deselecting all
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager annotationDeselected:(TTAnnotation *_Nonnull)annotation;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, annotationDeselected annotation: TTAnnotation)
Parameters
manager
TTAnnotationManager
annotation
annotation that was deselected
-
Called when selected annotation was clicked
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager annotationClicked:(TTAnnotation *_Nonnull)annotation;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, annotationClicked annotation: TTAnnotation)
Parameters
manager
TTAnnotationManager
annotation
annotation that was clicked
-
Called when touch up event occurs on polyline
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager touchUpPolyline:(TTPolyline *_Nonnull)polyline;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, touchUp polyline: TTPolyline)
Parameters
manager
TTAnnotationManager
polyline
polyline that was clicked
-
Called when touch up event occurs on polygon
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager touchUpPolygon:(TTPolygon *_Nonnull)polygon;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, touchUp polygon: TTPolygon)
Parameters
manager
TTAnnotationManager
polygon
polygon that was clicked
-
Called when touch up event occurs on circle
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager touchUpCircle:(TTCircle *_Nonnull)circle;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, touchUp circle: TTCircle)
Parameters
manager
TTAnnotationManager
circle
circle that was clicked
-
Called when one of annotation on the map becomes selected and callout is needed to display. By default map displays callout with coordinate.
Declaration
Objective-C
- (id)annotationManager:(id<TTAnnotationManager> _Nonnull)manager viewForSelectedAnnotation:(TTAnnotation *_Nonnull)selectedAnnotation;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, viewForSelectedAnnotation selectedAnnotation: TTAnnotation) -> Any!
Parameters
manager
TTAnnotationManager
selectedAnnotation
selectedAnnotation that requires callout
Return Value
UIView
* -
Called when the dragging state of an annotation changes.
Declaration
Objective-C
- (void)annotationManager:(id<TTAnnotationManager> _Nonnull)manager draggingAnnotation:(TTAnnotation *_Nonnull)annotation stateDrag:(TTAnnotationDragState)state;
Swift
optional func annotationManager(_ manager: TTAnnotationManager, dragging annotation: TTAnnotation, stateDrag state: TTAnnotationDragState)
Parameters
manager
TTAnnotationManager
annotation
the annotation being dragged
state
current drag state for TTAnnotation.