You may use ComposeUIViewController wrapping function to wrap any @Composable function to UIViewController. However we recommend to wrap not individual elements with it but your Compose UI as a whole that you would like to use within your iOS application. It can be the whole application, individual screens or a part of UI. We don't plan to provide other means for wrapping Compose.
l
Louis
04/13/2023, 7:59 AM
Why do you recommend to wrap whole screens or app, i did for components that I use in swiftui. What's the problem with this approach?
I just see that there is no more need for internal modifier so sharing little components makes even more sense to me because it's easier than before. No?
n
Nikita Lipsky
04/13/2023, 9:05 AM
It is ok to wrap a part of the screen that is written in Compose. We just don't recommend to wrap individual widgets with it and have more than one wrapped Compose on the same screen.
Actually we have not even tested embedding more than one wrapped Compose views on the same screen