---
title: "updateSpellingPanel(withGrammarString:detail:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsspellchecker/updatespellingpanel(withgrammarstring:detail:)"
---

# updateSpellingPanel(withGrammarString:detail:)

Specifies a grammar-analysis detail to highlight in the Spelling panel.

## Declaration

```swift
func updateSpellingPanel(withGrammarString string: String, detail: [String : Any])
```

## Parameters

- `string`: Problematic grammatical unit identified by doc://com.apple.appkit/documentation/AppKit/NSSpellChecker/checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:).
- `detail`: One of the grammar-analysis details provided by doc://com.apple.appkit/documentation/AppKit/NSSpellChecker/checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:).

## See Also

### Managing Panels

- [spellingPanel](appkit/nsspellchecker/spellingpanel.md)
- [substitutionsPanel](appkit/nsspellchecker/substitutionspanel.md)
- [updatePanels()](appkit/nsspellchecker/updatepanels().md)
- [accessoryView](appkit/nsspellchecker/accessoryview.md)
- [substitutionsPanelAccessoryViewController](appkit/nsspellchecker/substitutionspanelaccessoryviewcontroller.md)
