Propagate interface orientation and status bar behaviors to layers#2686
Propagate interface orientation and status bar behaviors to layers#2686
Conversation
...rc/uikitInstrumentedTest/kotlin/androidx/compose/ui/scene/ComposeLayersViewControllerTest.kt
Outdated
Show resolved
Hide resolved
…e/ui/scene/ComposeLayersViewControllerTest.kt Co-authored-by: Vendula Švastalová <[email protected]>
|
Can we also add a test specific to the Popup orientation bug? |
Review Compose PR for Orientation and Status Bar Updates
Review Pull Request for Interface Orientation and Status Bar Changes
| override fun userInterfaceStyleDidChange() {} | ||
|
|
||
| override fun preferredInterfaceOrientationForPresentation(): UIInterfaceOrientation { | ||
| return referenceWindow?.rootViewController?.preferredInterfaceOrientationForPresentation() |
There was a problem hiding this comment.
Are we guaranteed that referenceWindow can never be the internal LayersWindow (whose rootViewController is ComposeLayersViewController)? If that happens, preferredInterfaceOrientationForPresentation / supportedInterfaceOrientations / shouldAutorotate will end up calling themselves via referenceWindow.rootViewController and recurse.
It might be worth guarding against this explicitly, e.g. if (referenceWindow?.rootViewController === this) { ... }, or otherwise ensuring referenceWindow is always the host window.
There was a problem hiding this comment.
Are we guaranteed that referenceWindow can never be the internal LayersWindow
Thanks for the comment! referenceWindow could be a LayersWindow, but it will never be the same LayersWindow that contains current view controller, so this will never be an endless recursion.
GitHub AI Assistant: Review iOS Orientation and Status Bar PR Changes
Review iOS interface orientation and status bar propagation changes
Propagate interface orientation as well as status bar flags from the windows that contains Compose container to the platform layers view controller.
Fixes https://youtrack.jetbrains.com/issue/CMP-9472/Popup-window-should-follow-the-rotation-appearance-methods-with-the-main-container
Release Notes
Features - iOS