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
| Property | Description |
|---|---|
interfaceOrientations | The orientations you want |
Examples
js
const prefs = new UIWindowSceneGeometryPreferencesIOS(['landscapeRight']);
console.log(prefs.interfaceOrientations.join(','));Result: logs landscapeRight.
Corresponding iOS API
UIWindowSceneGeometryPreferencesIOS.