Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
import SwiftUI
struct ContentView: View {
var body: some View {
Canvas { context, size in
for x in stride(from: 0.0, to: size.width, by: 40) {
for y in stride(from: 0.0, to: size.height, by: 40) {
context.stroke(Path(CGRect(x: x, y: y, width: 40, height: 40)), with: .color(.blue))
}
}
}
}
}Coding works best on desktop or with an external keyboard.