UIWindowSceneGeometry
UIWindowSceneGeometry represents a scene's geometry at a given moment: the interface orientation, whether the orientation is locked, and whether the scene is being resized interactively. It holds the values from the moment it was read and doesn't change afterward.
Inheritance: EventTarget → NSObject → UIWindowSceneGeometry
Constructor
Can't be created with new; doing so throws TypeError. Read it from the scene's effectiveGeometry.
Instance properties
All read-only.
| Property | Description |
|---|---|
interfaceOrientation read-only | The interface orientation |
isInterfaceOrientationLocked read-only | Whether the orientation is locked |
isInteractivelyResizing read-only | Whether the scene is being resized by dragging |
Examples
js
application.addEventListener('sceneconnect', (e) => {
const geometry = e.scene.effectiveGeometry;
console.log(geometry.interfaceOrientation, geometry.isInteractivelyResizing);
});Result: with the phone held upright, logs portrait false.
Corresponding iOS API
UIWindowSceneGeometry.