---
title: cancel()
framework: mapkit
role: symbol
role_heading: Instance Method
path: mapkit/mklocalsearchcompleter/cancel()
---

# cancel()

Cancels an in-progress search operation.

## Declaration

```swift
func cancel()
```

## Discussion

Discussion If a search operation is in progress, this method attempts to cancel it. If cancellation is successful, the search completer doesn’t notify its delegate. If no search operation is in progress, this method does nothing.

## See Also

### Canceling the query

- [isSearching](mapkit/mklocalsearchcompleter/issearching.md)
