<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpellChecker/updateSpellingPanel(withGrammarString:detail:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSpellChecker(im)updateSpellingPanelWithGrammarString:detail:"
  },
  "title" : "updateSpellingPanel(withGrammarString:detail:)"
}
-->

# updateSpellingPanel(withGrammarString:detail:)

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

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

## Parameters

`string`

Problematic grammatical unit identified by [`checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)`](/documentation/AppKit/NSSpellChecker/checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)).

`detail`

One of the grammar-analysis details provided by [`checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)`](/documentation/AppKit/NSSpellChecker/checkGrammar(of:startingAt:language:wrap:inSpellDocumentWithTag:details:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)