Skip to content

Instantly share code, notes, and snippets.

@ashishkakkad8
Created June 30, 2024 19:41
Show Gist options
  • Save ashishkakkad8/f0df51b2a5da6b7f914efbca9f71aafb to your computer and use it in GitHub Desktop.
Save ashishkakkad8/f0df51b2a5da6b7f914efbca9f71aafb to your computer and use it in GitHub Desktop.
MeshGradient in SwiftUI
MeshGradient(
width: 3,
height: 3,
points: [
[0.0, 0.0], [0.5, 0.0], [1.0, 0.0],
[0.0, 0.5], [0.5, 0.5], [1.0, 0.5],
[0.0, 1.0], [0.5, 1.0], [1.0, 1.0]
], colors: [
.red, .red, .red,
.black, .red, .black,
.black, .red, .black
])
.edgesIgnoringSafeArea(.all)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment