I know you can use .cornerRadius()
to round all the corners of a SwiftUI view but is there a way to round only specific corners such as the top?
iOS 16+
simply use UnevenRoundedRectangle
VStack {
UnevenRoundedRectangle(cornerRadii: .init(bottomTrailing: 50, topTrailing: 50))
.fill(.orange)
.frame(width: 200, height: 100)
}
Result: