-
Notifications
You must be signed in to change notification settings - Fork 102
Support sizing of UIKit interop views in Compose #2485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...rumentedTest/kotlin/androidx/compose/ui/interop/InteropUIKitViewSizingWithConstraintsTest.kt
Outdated
Show resolved
Hide resolved
...InstrumentedTest/kotlin/androidx/compose/ui/interop/InteropUIKitViewSizingWithUILabelTest.kt
Show resolved
Hide resolved
...i/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/interop/InteropInteractionModeTest.kt
Outdated
Show resolved
Hide resolved
.../ui/src/desktopMain/kotlin/androidx/compose/ui/viewinterop/SwingInteropViewHolder.desktop.kt
Outdated
Show resolved
Hide resolved
.../src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropViewMeasurePolicy.uikit.kt
Outdated
Show resolved
Hide resolved
.../src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropViewMeasurePolicy.uikit.kt
Outdated
Show resolved
Hide resolved
3acd400 to
49442a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please wait approval from iOS folks too
|
LGTM, Also I have to mention that current implementation has known layout issues when used together with UI components that use NSLayoutConstraints mechanism (and works fine with SwiftUI and self-sizing views). |
|
Description for this PR is updated and issue for support for |
Adds support for sizing UIKit interop views in Compose based on each view’s fitting size. This PR adds support for sizing of SwiftUI
Views hosted byUIHostingControllerand for basicUIViewsubclasses which don't involve usage ofNSLayoutConstraints. MakesmeasurePolicyabstract inInteropViewHolder, requiring subclasses to override it instead of passing it into the initializer.Fixes CMP-9122 iOS support intrinsic sizing of interop elements - SwiftUI and UIView without constraints
Fixes CMP-7182 CMP SwiftUI wrapped content size does not work
Testing
Adds new test suits
InteropUIKitViewSizingWithConstraintsTestInteropUIKitViewSizingWithUILabelTestInteropUIMenuTestInteropInteractionModeTestRelease Notes
Features - iOS