I have an KMP application using Compose Multiplatform as UI framework. And here’s the catch, when I launch app on iOS Simulator, there are some extra space on all four sides.
Here is how it looks:
You can see it on brown header that it doesn’t takes while screen space. Any thoughts?
Here is the code from iOS side:
struct ComposeView: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
MainViewControllerKt.MainViewController()
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
struct ContentView: View {
var body: some View {
ComposeView()
.ignoresSafeArea()// Compose has own keyboard handler
}
}
and from CMP side:
@Composable
@Preview
fun App() {
val vault = LocalVaultProvider.current
AppTheme {
Box(
modifier = Modifier.safeContentPadding(),
) {
Navigator(
screen = if (!(vault.vault.existsObject(DEF_TR) && vault.vault.existsObject(DEF_LANG))) OnboardingScreen() else HomeScreen()
) {
FadeTransition(
navigator = it, animationSpec = spring(
dampingRatio = Spring.DampingRatioNoBouncy,
stiffness = Spring.StiffnessVeryLow,
)
)
}
}
}
}