An object that exposes nonview areas as focusable.


class UIFocusGuide : UILayoutGuide


As a subclass of UILayoutGuide, a focus guide is not a view and does not define a new view or participate in the view hierarchy at all, except as an Auto Layout guide. Unlike UILayoutGuide, UIFocusGuide represents an invisible, focusable region that can redirect focus movement to other views. The UIFocus.h header file, including its related classes and its protocol, creates a single high-level software interface for controlling focus in apps that use focus-based input. This programming interface also helps to control focus behavior on the screen.


Enabling Focus

var isEnabled: Bool

A Boolean value that indicates whether the guide is focusable.

var preferredFocusEnvironments: [UIFocusEnvironment]!

An array of focus environments to which the guide directs focus, ordered by priority.

var preferredFocusedView: UIView?

The view that the focus will be redirected to if this guide is focused.



Inherits From

Conforms To

See Also

Focus Guides

Creating Custom Navigation Interactions

Build nonstandard navigation interactions that move focus to the desired location.