79709903

Date: 2025-07-22 05:10:12
Score: 1
Natty:
Report link

The padding at the bottom appears to be caused by the Home Indicator. However, I found a workaround by applying the padding to the background Color instead. Please see the updated code below. Screenshots are attached for your reference.

struct ContentView1: View {
    var body: some View {
        TabView {
            ForEach(0...10, id: \.self) { page in
                ZStack {
                    Color(.blue).opacity(0.2)
                        .padding(.bottom, -20)

                    Text("Page \(page)")
                }
                .edgesIgnoringSafeArea(.all)
            }
        }
        .tabViewStyle(.page)
    }
}

enter image description here
enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Anmol_Maheshwari