Contents

Focus

Identify and control which visible object responds to user interaction.

Overview

Focus indicates which element in the display receives the next input. Use view modifiers to indicate which views can receive focus, to detect which view has focus, and to programmatically control focus state.

[Image]

For design guidance, see Focus and selection in the Human Interface Guidelines.

Topics

Essentials

Indicating that a view can receive focus

Managing focus state

Exposing value types to focused views

Exposing reference types to focused views

Setting focus scope

Controlling default focus

Resetting focus

Configuring effects

See Also

Event handling