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
managerTTAnnotationManager
annotationTTAnnotation
-
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
managerTTAnnotationManager
annotationannotation 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
managerTTAnnotationManager
annotationannotation 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
managerTTAnnotationManager
polylinepolyline 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
managerTTAnnotationManager
polygonpolygon 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
managerTTAnnotationManager
circlecircle 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
managerTTAnnotationManager
selectedAnnotationselectedAnnotation 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
managerTTAnnotationManager
annotationthe annotation being dragged
statecurrent drag state for TTAnnotation.
TTAnnotationDelegate Protocol Reference