---
title: "checkSpelling(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstext/checkspelling(_:)"
---

# checkSpelling(_:)

This action method searches for a misspelled word in the receiver’s text.

## Declaration

```swift
func checkSpelling(_ sender: Any?)
```

## Discussion

Discussion The search starts at the end of the selection and continues until it reaches a word suspected of being misspelled or the end of the text. If a word isn’t recognized by the spelling server, a showGuessPanel(_:) message then opens the Guess panel and allows the user to make a correction or add the word to the local dictionary.

## See Also

### Checking spelling

- [showGuessPanel(_:)](appkit/nstext/showguesspanel(_:).md)
