Skip to content

Commit 0ae5bce

Browse files
committed
ios: simplify usePreferredSizeSizing documentation
1 parent f3e476c commit 0ae5bce

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

compose/ui/ui/src/iosMain/kotlin/androidx/compose/ui/uikit/ComposeContainerConfiguration.ios.kt

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,12 @@ sealed class ComposeContainerConfiguration {
7474
var isClearFocusOnMouseDownEnabled: Boolean = ComposeUiFlags.isClearFocusOnMouseDownEnabled
7575

7676
/**
77-
* Enables preferred-size sizing interop for UIKit/SwiftUI hosting containers.
78-
*
79-
* When enabled, the internal container view participates in UIKit sizing APIs:
80-
* - `sizeThatFits(...)` proposals from UIKit/SwiftUI are translated to Compose constraints
81-
* - after each Compose layout completes, the scene is probed for its preferred size under the
82-
* latest proposal constraints
83-
* - if the preferred size changes, the hosting view invalidates its `intrinsicContentSize` to
84-
* trigger another UIKit/SwiftUI layout pass
85-
*
86-
* This mode is intended for `ComposeHostingView` / `ComposeHostingViewController` style
87-
* integrations. Other container types should keep it disabled to avoid unnecessary measuring
88-
* work and potential sizing feedback loops.
77+
* Enables sizing of the container to fit the preferred size of the Compose content, evaluated
78+
* under the size constraints proposed by the containing UIKit/SwiftUI layout flow (e.g.
79+
* `sizeThatFits` / intrinsic sizing).
8980
*/
9081
@ExperimentalComposeUiApi
91-
var usePreferredSizeSizing: Boolean = false
82+
var useSelfSizing: Boolean = false
9283
}
9384

9485
/**

0 commit comments

Comments
 (0)