init(for:)
Retrieves a focus system object that contains the state information for the specified object.
Declaration
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 protocol.
Return Value
The UIFocusSystem object that manages the state for the specified object or nil if focus interactions are not available for the object.