Solutions for: Frame Modifier

#alignment #rectangle #box #cgsize

Source: https://link.medium.com/AOQ7KUpCnub

...

Credit card shape

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))
    }
}

Last updated