Hey, I need some help with window insets on iOS - ...
# compose-ios
k
Hey, I need some help with window insets on iOS - it seems it does not ignore safe area for some reason? Compose code is:
Copy code
Box(
        modifier = Modifier
            .background(Color.Cyan)
            .fillMaxSize()
            .windowInsetsPadding(WindowInsets.safeDrawing)
            .fillMaxSize(),
    )
on Android it works as expected (draws cyan behind status and nav bar) but iOS does not budge. On iOS having
ComposeView().ignoreSafeArea()
does nothing it seems? CMP 1.7.3
d
Try
ComposeView().ignoresSafeArea(.container)
k
same result, but it’s expected, as no argument to
ignoreSafeArea
expands content to all regions
d
If you're applying it like this and it doesn't work then I'm not sure
k
okay found it - it was me 😄 I built the ios project from scratch and as the main SwiftUI view I used the UIController one directly (UIViewControllerRepresentable) instead of SwiftUI view (which had .ignoreSafeArea applied)
👍 2
too bad xcode did not mark it as not used, would have help
thanks for the help