Skip to content

UIWindowSceneGeometryPreferencesIOS ​

UIWindowSceneGeometryPreferencesIOS represents the preferences for a rotation request: which orientations you want. Pass it to the scene's requestGeometryUpdateWithPreferences().

Inheritance: EventTarget → NSObject → UIWindowSceneGeometryPreferencesIOS

Constructor ​

UIWindowSceneGeometryPreferencesIOS()

Creates preferences from a list of orientation names.

Instance properties ​

PropertyDescription
interfaceOrientationsThe orientations you want

Examples ​

js
const prefs = new UIWindowSceneGeometryPreferencesIOS(['landscapeRight']);
console.log(prefs.interfaceOrientations.join(','));

Result: logs landscapeRight.

Corresponding iOS API ​

UIWindowSceneGeometryPreferencesIOS.

See also ​