Contents

setDismissesAutomatically(_:)

Sets the state of the flag that determines whether the candidates window dismisses automatically.

Declaration

func setDismissesAutomatically(_ flag: Bool)

Parameters

  • flag:

    True to have the candidates window dismiss automatically; otherwise False.

Discussion

By default, if the user presses the Return or Enter keys, the candidates are dismissed and a candidateSelected: message is sent to the input controller. You can call the setDismissesAutomatically: method, passing false as the flag parameter to change the default dismissal behavior. The input controller still receives a candidatesSelected: message.

When you set the flag to false, an input method processes text input while dynamically updating the content of the candidates as the user inputs text. When a session deactivates, candidate window is hidden regardless of the state of the flag.

See Also

Managing Window Visibility and Behavior