---
title: "dequeueReusableAnnotationView(withIdentifier:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapview/dequeuereusableannotationview(withidentifier:)"
---

# dequeueReusableAnnotationView(withIdentifier:)

Returns a reusable annotation view using its identifier.

## Declaration

```swift
func dequeueReusableAnnotationView(withIdentifier identifier: String) -> MKAnnotationView?
```

## Parameters

- `identifier`: A string identifying the annotation view for the map view to reuse. This string is the same one you specify when initializing the annotation view using the doc://com.apple.mapkit/documentation/MapKit/MKAnnotationView/init(annotation:reuseIdentifier:) method.

## Return Value

Return Value An annotation view with the specified identifier, or nil if no such object exists in the reuse queue.

## Discussion

Discussion For performance reasons, it’s best practice to reuse MKAnnotationView objects in your map views. As annotation views move offscreen, the map view moves them to an internally managed reuse queue. As new annotations move onscreen, and the map view prompts your code to provide a corresponding annotation view, attempt to dequeue an existing view before creating a new one. Dequeueing saves time and memory during performance-critical operations like scrolling.

## See Also

### Creating annotation views

- [register(_:forAnnotationViewWithReuseIdentifier:)](mapkit/mkmapview/register(_:forannotationviewwithreuseidentifier:).md)
- [dequeueReusableAnnotationView(withIdentifier:for:)](mapkit/mkmapview/dequeuereusableannotationview(withidentifier:for:).md)
- [view(for:)](mapkit/mkmapview/view(for:)-33w8k.md)
- [MKMapViewDefaultAnnotationViewReuseIdentifier](mapkit/mkmapviewdefaultannotationviewreuseidentifier.md)
- [MKMapViewDefaultClusterAnnotationViewReuseIdentifier](mapkit/mkmapviewdefaultclusterannotationviewreuseidentifier.md)
