<!--
{
  "availability" : [
    "iOS: 9.0.0 - 10.0.0",
    "iPadOS: 9.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: 9.0.0 - 10.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFocusEnvironment/preferredFocusedView",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIFocusEnvironment(py)preferredFocusedView"
  },
  "title" : "preferredFocusedView"
}
-->

# preferredFocusedView

Specifies the view that should be focused if this environment is focused.

```
weak optional var preferredFocusedView: UIView? { get }
```

## Discussion

Since [`UIView`](/documentation/UIKit/UIView) conforms to [`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment), any view returned from this property also has a preferred focused view. This creates a linked-list of views called the *preferred focus chain*. When focus updates to a new view, the focus engine will actually update focus to the deepest, focusable view in that new view’s preferred focus chain. Similarly, when setting initial focus, such as at application launch, the initial focused view is found by following the preferred focus chain from the root window.

By default, [`UIView`](/documentation/UIKit/UIView) returns itself and [`UIViewController`](/documentation/UIKit/UIViewController) returns its root view. Returning `self` in a focusable view indicates that view should be focused. Returning `self` in an unfocusable view causes the focus engine to pick a default preferred focused view, by finding the closest focusable subview to the top-leading corner of the screen. Returning `nil` indicates that there is no preferred focused view.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)