mohamed rejeb
08/07/2024, 9:45 AMIvan Matkov
08/07/2024, 11:37 AMElijah Semyonov
08/07/2024, 11:45 AMComposeUIViewController
into your own custom subclass of UIViewController
and override things you need there.
So this API is more of a QoL-feature.mohamed rejeb
08/07/2024, 4:20 PMUIViewController
size.
Talking about ComposeUIViewController
design, can't we have it as an abstract/open class with a method for setting composable content, and then we can override anything we want directly. Not sure if this is possible with Kotlin/Native.
class MyUIViewController(): ComposeUIViewController() {
@Composable
override fun Content() {
Text("Hi!")
}
}
Elijah Semyonov
08/08/2024, 2:32 PMwanted to observeCan you explain your particular usage scenario? It’s possible to override ObjC classes in K/N, but there is a lot of restrictions and unobvious things going on accompanied with not well discoverable workarounds. So when it’s not required we’d better provide more streamlined approach for doing stuff, hence the question in the start of this message.sizeUIViewController
Ivan Matkov
08/08/2024, 2:34 PMI just wanted to observeLocalWindowInfo.current.containerSizesize.UIViewController
mohamed rejeb
08/08/2024, 5:00 PMComposeUIViewController
inside a UIKit bottom sheet and it was working fine until I added partially expanded support. When changing the sheet from partially expanded to expanded or vice versa the Compose content is not recomposed correctly, I wanted to observe the size and recompose it manually (Also LocalWindowInfo.current.containerSize
doesn't work on this case)
What I'm doing now is recomposing the sheet content on each frame which is not the best solution.
https://github.com/MohamedRejeb/Calf/blob/main/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/sheet/AdaptiveBottomSheet.ios.kt#L29Elijah Semyonov
08/08/2024, 6:10 PMmohamed rejeb
08/08/2024, 7:27 PM