---
title: preferredFocusEnvironments
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uifocusguide/preferredfocusenvironments
---

# preferredFocusEnvironments

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

## Declaration

```swift
var preferredFocusEnvironments: [any UIFocusEnvironment]! { get set }
```

## Mentioned in

About focus interactions for Apple TV Creating custom navigation interactions

## Discussion

Discussion Setting this property to a nonempty array marks this guide’s layoutFrame as focusable. If empty, this guide is effectively disabled. If focused, the guide attempts to redirect focus to each environment in the array, in order, stopping when a focusable item in an environment has been found.

## See Also

### Enabling focus

- [isEnabled](uikit/uifocusguide/isenabled.md)
- [preferredFocusedView](uikit/uifocusguide/preferredfocusedview.md)
