xxxxxxxxxx
view.layer.cornerRadius = 25
view.layer.masksToBounds = true
xxxxxxxxxx
struct UnevenRectExample: View {
var body: some View {
UnevenRoundedRectangle(topLeadingRadius: 20, bottomLeadingRadius: 0, bottomTrailingRadius: 20, topTrailingRadius: 0)
.foregroundStyle(.orange.gradient)
.frame(height: 200)
.overlay(Text("DevTechie.com").font(.largeTitle))
.padding()
}
}
xxxxxxxxxx
Rectangle()
.fill(Color.white)
.padding(.bottom, 10) // increase padding at position not include CornerRadius
.cornerRadius(10)
.padding(.bottom, -10) // increase padding at position not include CornerRadius