Hey, so i'm using the swift tabview within my cmp ...
# compose-ios
i
Hey, so i'm using the swift tabview within my cmp app, at the moment its not showing because i need to give it a fixed height, but how do i use the default tabview height and padding?
Copy code
@Composable
actual fun PlatformBottomNavigation(
    selectedTabIndex: Int,
    onTabSelected: (Int) -> Unit,
    navigateToSettings: () -> Unit
) {
    val factory = LocalNativeViewFactory.current
    UIKitViewController(
        factory = {
            factory.createBottomNavigation(
                selectedTabIndex = selectedTabIndex,
                onTabSelected = onTabSelected,
                navigateToSettings = navigateToSettings
            )
        },
        modifier = Modifier
            .fillMaxWidth()
    )
}
1
ok so i think i've figured it out 😁, looks decent
Copy code
val factory = LocalNativeViewFactory.current
    val windowInsets = UIApplication.sharedApplication.keyWindow?.safeAreaInsets?.useContents { this.bottom } ?: 0.0
    val tabBarHeight = UITabBarController().tabBar.frame.useContents { this.size.height }.dp + windowInsets.dp
    UIKitViewController(
        factory = {
            factory.createBottomNavigation(
                selectedTabIndex = selectedTabIndex,
                onTabSelected = onTabSelected,
                navigateToSettings = navigateToSettings
            )
        },
        modifier = Modifier
            .fillMaxWidth()
            .height(tabBarHeight)
    )