#alignment #rectangle #box #cgsize
Last updated 1 year ago
Source: https://link.medium.com/AOQ7KUpCnub
...
struct ContentView: View { var body: some View { LinearGradient(gradient: Gradient(colors: [.yellow, .red]), startPoint: .topLeading, endPoint: .bottomTrailing) .frame(width: 300, height: 200) .clipShape(RoundedRectangle(cornerRadius: 10)) } }