Question – screen below – i don’t understand why do I have bottom padding for save button
my code is:
<code>import SwiftUI
struct test: View {
@Environment(.dismiss) private var dismiss
var body: some View {
ZStack{
Color.DesignSystem.background.ignoresSafeArea()
VStack(spacing: 20){
Spacer()
Button {
} label: {
Text("Save")
.font(.fontRegular(size: 20))
.tint(.white)
.padding()
.frame(maxWidth: .infinity)
.background(Color.DesignSystem.blue)
.clipShape(RoundedRectangle(cornerRadius: 12))
}
}
.background(.black)
.padding(.horizontal, 80)
.padding(.top, 12)
}
}
}
#Preview {
test()
}
</code>
<code>import SwiftUI
struct test: View {
@Environment(.dismiss) private var dismiss
var body: some View {
ZStack{
Color.DesignSystem.background.ignoresSafeArea()
VStack(spacing: 20){
Spacer()
Button {
} label: {
Text("Save")
.font(.fontRegular(size: 20))
.tint(.white)
.padding()
.frame(maxWidth: .infinity)
.background(Color.DesignSystem.blue)
.clipShape(RoundedRectangle(cornerRadius: 12))
}
}
.background(.black)
.padding(.horizontal, 80)
.padding(.top, 12)
}
}
}
#Preview {
test()
}
</code>
import SwiftUI
struct test: View {
@Environment(.dismiss) private var dismiss
var body: some View {
ZStack{
Color.DesignSystem.background.ignoresSafeArea()
VStack(spacing: 20){
Spacer()
Button {
} label: {
Text("Save")
.font(.fontRegular(size: 20))
.tint(.white)
.padding()
.frame(maxWidth: .infinity)
.background(Color.DesignSystem.blue)
.clipShape(RoundedRectangle(cornerRadius: 12))
}
}
.background(.black)
.padding(.horizontal, 80)
.padding(.top, 12)
}
}
}
#Preview {
test()
}
I dont see from where comes bottom padding for save button, you can copy and run code and see for your self, there is nothing extra, is it some safe area?