---
title: prepareForReuse()
framework: mapkit
role: symbol
role_heading: Instance Method
path: mapkit/mkannotationview/prepareforreuse()
---

# prepareForReuse()

Calls this method when removing the view from the reuse queue.

## Declaration

```swift
func prepareForReuse()
```

## Discussion

Discussion The default implementation of this method does nothing. You can override it in your custom annotation views and use it to put the view in a known state before the map view returns it to your map view delegate.

## See Also

### Related Documentation

- [dequeueReusableAnnotationView(withIdentifier:)](mapkit/mkmapview/dequeuereusableannotationview(withidentifier:).md)

### Creating and preparing an annotation view

- [init(annotation:reuseIdentifier:)](mapkit/mkannotationview/init(annotation:reuseidentifier:).md)
- [init(coder:)](mapkit/mkannotationview/init(coder:).md)
- [prepareForDisplay()](mapkit/mkannotationview/preparefordisplay().md)
