completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)
Provides a list of complete words that the user might be trying to type based on a partial word in a given string.
Declaration
func completions(forPartialWordRange range: NSRange, in string: String, language: String?, inSpellDocumentWithTag tag: Int) -> [String]?Parameters
- range:
Range that identifies a partial word in
string. - string:
String with the partial word from which to generate the result.
- language:
Language to used in
string. Whennil, this method uses the language selected in the Spelling panel. - tag:
Identifies the spell document with ignored words to use.
Return Value
List of complete words from the spell checker dictionary in the order they should be presented to the user.
See Also
Managing the Spell-Checking Process
uniqueSpellDocumentTag()closeSpellDocument(withTag:)ignoreWord(_:inSpellDocumentWithTag:)ignoredWords(inSpellDocumentWithTag:)setIgnoredWords(_:inSpellDocumentWithTag:)setWordFieldStringValue(_:)updateSpellingPanel(withMisspelledWord:)hasLearnedWord(_:)unlearnWord(_:)learnWord(_:)userQuotesArray(forLanguage:)userReplacementsDictionary