Contents

UIFocusEnvironment

A set of methods that define the focus behavior for a branch of the view hierarchy.

Declaration

@MainActor protocol UIFocusEnvironment : NSObjectProtocol

Overview

The UIFocusEnvironment protocol provides a common interface for specifying and reacting to focus behavior throughout your app. Classes in UIKit that conform to this protocol include UIView, UIViewController, UIWindow, and UIPresentationController — in other words, classes that are either directly or indirectly in control of views on the screen.

Topics

Requesting focus update

Validating focus movements

Responding to focus updates

Controlling user-generated focus movements

Getting the sound to play during updates

Checking the ancestry of the environment

Identifying the focus group

See Also

Focus interactions