The cornerRadius modifier clips a view to its bounding frame, with the specified corner radius. In another words, any SwiftUI view can have its corners rounded using the cornerRadius() modifier. But is there a way to round only specific corners such as the top? Of course! We will create a rectangle with a top-right rounded corner and a bottom-left rounded corner as below. Let’s do it step by step!
[…]