Contents

complete(_:)

Invokes completion in a text view.

Declaration

func complete(_ sender: Any?)

Parameters

  • sender:

    The control sending the message. May be nil.

Discussion

By default invoked using the F5 key, this method provides users with a choice of completions for the word currently being typed. May be invoked programmatically if autocompletion is desired by a client of the text system. You can change the key invoking this method using the text system’s key bindings mechanism; see “Text System Defaults and Key Bindings” for an explanation of the procedure.

The delegate may replace or modify the list of possible completions by implementing textView(_:completions:forPartialWordRange:indexOfSelectedItem:). Subclasses can control the list by overriding completions(forPartialWordRange:indexOfSelectedItem:).

See Also

Performing text completion