searchDictationBehavior

Configures the dictation behavior for any search fields configured by the searchable modifier.

View ModifieriOS 17.0+visionOS 1.0+searchDictationBehavior(_:) in SwiftUI

Declaration

React
compose().searchDictationBehavior(
  dictationBehavior: SwiftUI.TextInputDictationBehavior
)
Swift
nonisolated func searchDictationBehavior(
    _ dictationBehavior: TextInputDictationBehavior
) -> some View

Parameters

Discussion

By default, search fields on visionOS will automatically start dictation when looking at the dictation button in the search field. You can change this behavior by providing a value of TextInputDictationBehavior.preventDictation to this modifier.

See the TextInputDictationBehavior type for more information on the available dictation behaviors.

See also

More in Navigation.