---
title: "init(windowScene:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uiwindow/init(windowscene:)"
---

# init(windowScene:)

Creates a window and associates it with the specified scene object.

## Declaration

```swift
init(windowScene: UIWindowScene)
```

## Parameters

- `windowScene`: The scene object in which to display the window.

## Return Value

Return Value A new window object associated with the specified scene.

## Discussion

Discussion This method creates the new window and automatically associates it with the specified scene. You can access this window later from the scene’s windows property.
