AWFMapCallout
Objective-C
@interface AWFMapCallout : NSObject
Swift
class AWFMapCallout : NSObject
An AWFMapCallout object is a controller responsible for managing the presentation of an AWFCalloutView instance on a map.
-
The callout view for map callout.
Declaration
Objective-C
@property (nonatomic, readonly) AWFCalloutView *_Nonnull calloutView;Swift
var calloutView: AWFCalloutView { get } -
The map strategy for the map callout.
Declaration
Objective-C
@property (nonatomic, weak, readonly) id<AWFMapStrategy> _Nullable strategy; -
The receiver’s data source.
A map callout controller requests information from its data source that is specific to the map strategy currently being used by a weather map.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<AWFMapCalloutDataSource> dataSource;Swift
weak var dataSource: AWFMapCalloutDataSource? { get set } -
The receiver’s delegate.
A map callout controller informs its delegate about events regarding its associated map annotation and interactions with callout accessory views.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<AWFMapCalloutDelegate> delegate;Swift
weak var delegate: AWFMapCalloutDelegate? { get set } -
The map annotation object currently associated with the callout.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) id<AWFAnnotation> currentAnnotationForCallout;Swift
var currentAnnotationForCallout: AWFAnnotation? { get } -
The callout information view currently being used.
Declaration
Objective-C
@property (nonatomic, strong, readonly) AWFMapCalloutInfo *_Nonnull currentCalloutInfo;Swift
var currentCalloutInfo: AWFMapCalloutInfo { get } -
Instantiates a map callout controller associated with the specified map strategy.
Declaration
Objective-C
- (nonnull instancetype)initWithMapStrategy: (nonnull id<AWFMapStrategy>)mapStrategy;Parameters
mapStrategyThe map strategy to associate this callout with
Return Value
A map callout instance initialized with the map strategy.
-
Presents the map callout from the
annotationusing the specifiedtitleandsubtitle.Declaration
Objective-C
- (void)showFromAnnotation:(nonnull id)annotation withTitle:(nonnull NSString *)title subtitle:(nullable NSString *)subtitle;Swift
func show(fromAnnotation annotation: Any, withTitle title: String, subtitle: String?)Parameters
annotationThe annotation from which to present the callout.
titleThe primary textual content.
subtitleThe secondary textual content. If not provided, the title will only be displayed.
-
Presents the map callout from the
annotationusing the specifiedcontentView.Declaration
Objective-C
- (void)showFromAnnotation:(nonnull id)annotation withContentView:(nonnull UIView *)contentView;Swift
func show(fromAnnotation annotation: Any, withContentView contentView: UIView)Parameters
annotationThe annotation from which to present the callout.
contentViewThe view to display within the callout.
-
Presents the map callout from the
coordinateusing the specifiedtitleandsubtitle.Declaration
Objective-C
- (void)showAtCoordinate:(CLLocationCoordinate2D)coordinate withTitle:(nonnull NSString *)title subtitle:(nullable NSString *)subtitle;Swift
func show(at coordinate: CLLocationCoordinate2D, withTitle title: String, subtitle: String?)Parameters
coordinateThe map coordinate from which to present the callout.
titleThe primary textual content.
subtitleThe secondary textual content. If not provided, the title will only be displayed.
-
Presents the map callout from the
coordinateusing with specifiedtitleandsubtitleand optional accessory views.Declaration
Objective-C
- (void)showAtCoordinate:(CLLocationCoordinate2D)coordinate withTitle:(nonnull NSString *)title subtitle:(nullable NSString *)subtitle leftAccessoryView:(nullable UIView *)leftAccessoryView rightAccessoryView:(nullable UIView *)rightAccessoryView;Swift
func show(at coordinate: CLLocationCoordinate2D, withTitle title: String, subtitle: String?, leftAccessoryView: UIView?, rightAccessoryView: UIView?)Parameters
coordinateThe map coordinate from which to present the callout
titleThe callout title
subtitleThe callout subtitle. If not provided, the title will only be displayed
leftAccessoryViewThe view to display to the left of the title
rightAccessoryViewThe view to display to the right of the title
-
Presents the map callout from the
coordinateusing the specifiedcontentView.Declaration
Objective-C
- (void)showAtCoordinate:(CLLocationCoordinate2D)coordinate withContentView:(nonnull UIView *)contentView;Swift
func show(at coordinate: CLLocationCoordinate2D, withContentView contentView: UIView)Parameters
coordinateThe map coordinate from which to present the callout.
contentViewThe view to display within the callout.
-
Presents the map callout from the
coordinateusing the specifiedcontentViewand optional accessory views.Declaration
Objective-C
- (void)showAtCoordinate:(CLLocationCoordinate2D)coordinate withContentView:(nonnull UIView *)contentView leftAccessoryView:(nullable UIView *)leftAccessoryView rightAccessoryView:(nullable UIView *)rightAccessoryView;Swift
func show(at coordinate: CLLocationCoordinate2D, withContentView contentView: UIView, leftAccessoryView: UIView?, rightAccessoryView: UIView?)Parameters
coordinateThe map coordinate from which to present the callout
contentViewThe view to display within the callout
leftAccessoryViewThe view to display to the left of the content view
rightAccessoryViewThe view to display to the right of the content view
-
Presents the map callout from the specified
rectwithin the targetviewand constrained to the bounds of the specifiedconstrainedView.Declaration
Objective-C
- (void)showFromRect:(CGRect)rect inView:(nonnull UIView *)view constrainedToView:(nonnull UIView *)constrainedView animated:(BOOL)animated;Swift
func show(from rect: CGRect, in view: UIView, constrainedTo constrainedView: UIView, animated: Bool)Parameters
rectThe bounds within the
viewcoordinate space from which to present the calloutviewThe target view whose coordinate space is being used
constrainedViewThe view to constrain the callout within, meaning the callout will not appear outside the bounds of this view.
animatedWhether or not to animation the presentation.
-
Presents the map callout from the specified
rectwithin the targetviewand constrained to the bounds of the specifiedconstrainedView.Declaration
Objective-C
- (void)showFromView:(nonnull UIView *)fromView inView:(nonnull UIView *)view constrainedToView:(nonnull UIView *)constrainedView animated:(BOOL)animated;Swift
func show(from fromView: UIView, in view: UIView, constrainedTo constrainedView: UIView, animated: Bool)Parameters
fromViewThe view whose bounds are within the
viewcoordinate space from which to present the calloutviewThe target view whose coordinate space is being used
constrainedViewThe view to constrain the callout within, meaning the callout will not appear outside the bounds of this view.
animatedWhether or not to animation the presentation.
-
Dismisses the active callout, if any, from the map.
Declaration
Objective-C
- (void)dismiss:(BOOL)animated;Swift
func dismiss(_ animated: Bool)
View on GitHub
AWFMapCallout Class Reference