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 _ in 0..<300 {
let x = CGFloat.random(in:0...size.width)
let y = CGFloat.random(in:0...size.height)
context.fill(Path(ellipseIn:CGRect(x:x,y:y,width:3,height:3)),with:.color(.white))
}
}
}
}Coding works best on desktop or with an external keyboard.