---
title: "init(for:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uifocussystem/init(for:)"
---

# init(for:)

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

## Declaration

```swift
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 doc://com.apple.uikit/documentation/UIKit/UIFocusEnvironment protocol.

## Return Value

Return Value The UIFocusSystem object that manages the state for the specified object or nil if focus interactions are not available for the object.
