zrll
05/15/2025, 2:49 PM@OptIn(ExperimentalMaterial3Api::class)
@Composable
@Preview
fun App() {
AppTheme {
var showContent by remember { mutableStateOf(false) }
Scaffold(
Modifier.fillMaxWidth(),
topBar = { TopAppBar({ Text("Event Reminder") }) }) {
Column(Modifier.padding(it).fillMaxWidth().padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally) {
Button(onClick = { showContent = !showContent }) {
Text("Click me!")
}
AnimatedVisibility(showContent) {
val greeting = remember { Greeting().greet() }
Column(
Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Image(painterResource(Res.drawable.compose_multiplatform), null)
Text("Compose: $greeting")
}
}
}
}
}
}
krzysztof
05/15/2025, 3:34 PM.ignoreSafeArea
modifier is applied in swift view.
I hope this might give you more insight: https://swiftwithmajid.com/2021/11/03/managing-safe-area-in-swiftui/Colton Idle
05/15/2025, 4:21 PM