Contents

view(for:)

Returns the annotation view associated with the specified annotation object, if any.

Declaration

func view(for annotation: any MKAnnotation) -> MKAnnotationView?

Parameters

  • annotation:

    The annotation object whose view you want.

Return Value

The annotation view or nil if the view has not yet been created. This method may also return nil if the annotation is not in the visible map region and therefore does not have an associated annotation view.

See Also

Creating annotation views