Ismail
08/15/2025, 6:00 PM@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()
)
}
Ismail
08/15/2025, 6:22 PMval 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)
)