Contents

showGrammarPresentation(for:in:)

Used to support the presentation of grammar issues in text. When the user interacts with an issue, call this to bring up the relevant UI.

Declaration

func showGrammarPresentation(for range: NSRange, in context: NSWritingToolsCoordinator.Context) -> Bool

Discussion

Pass in context and range to identify the issue the user selected. The context must match one of the contexts returned from writingToolsCoordinator(_:requestsContextsFor:completion:) and the range must match the range in the context of one of the grammar details returned for that context from writingToolsCoordinator(_:requestsGrammarResultsFor:completion:) Returns NO if the UI cannot be brought up.