skip to Main Content

Ios swift – SwiftUI: How to clip an image overlay to its view?

I have the following view displaying a book image: struct MaskContentView: View { var body: some View { ZStack { Rectangle() .fill(LinearGradient(colors: [.red, .green], startPoint: .top, endPoint: .bottom)) Rectangle() .fill(LinearGradient(colors: [.red, .purple, .green], startPoint: .top, endPoint: .bottom)) .padding(10) Rectangle() .fill(LinearGradient(colors:…

VIEW QUESTION
Back To Top
Search