<!--
{
  "availability" : [
    "iOS: 12.0.0 - 15.0.0",
    "iPadOS: 12.0.0 - 15.0.0",
    "macCatalyst: 13.1.0 - 15.0.0",
    "tvOS: 12.0.0 - 15.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFocusSystem/init(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIFocusSystem(cm)focusSystemForEnvironment:"
  },
  "title" : "init(for:)"
}
-->

# init(for:)

Retrieves a focus system object that contains the state information for the specified object.

```
init?(for environment: any UIFocusEnvironment)
```

## Parameters

`environment`

The object whose state you want to return. Specify the view, view controller, or window whose state you want. You can also specify any other object that adopts the [`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment) protocol.

## Return Value

The [`UIFocusSystem`](/documentation/UIKit/UIFocusSystem) object that manages the state for the specified object or `nil` if focus interactions are not available for the object.

---

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)