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

# preferredFocusEnvironments

An array of focus environments, ordered by priority, to which this environment prefers focus to be directed during a focus update.

## Declaration

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

## Discussion

Discussion The preferred focus environments listed in this property define where to search for the default focused item in an environment, such as when focus updates programmatically. Starting from the target environment, each preferred focus environment is recursively searched in the order it appears in the array until an eligible, focusable item is found. Preferred focus environments can include focusable and nonfocusable items, in addition to nonitem environments. Returning an empty array is equivalent to returning an array containing only self.

## See Also

### Controlling user-generated focus movements

- [preferredFocusedView](uikit/uifocusenvironment/preferredfocusedview.md)
