Luno
09/09/2023, 12:16 PMmodifier - The modifier to be applied to the layout. Size should be specified in modifier. Modifier may contains crop() modifier with different shapes.Does this imply that, currently, it's not feasible to utilize the weight modifier for child UIKitViews within a column or row to define their sizes? To provide an example, here is a code snippet:
Column(modifier = Modifier.fillMaxSize()) {
UIKitView(
factory = {
val label = UILabel(frame = CGRectZero.readValue())
label.text = "UILabel 0"
label.textColor = UIColor.blackColor
label
},
modifier = Modifier.weight(1f),
background = Color.Blue
)
UIKitView(
factory = {
val label = UILabel(frame = CGRectZero.readValue())
label.text = "UILabel 1"
label.textColor = UIColor.whiteColor
label
},
modifier = Modifier.weight(1f),
background = Color.Black
)
}
The result is that the first view fill max height.
Is this expected? Will that change in the future?