technically, the Ball is a transparent SpriteKit window with a physics body (the ball). the only remotely interesting thing here is that it animates in/out of its dock icon. you technically can't do this, but you can SORTA guess where the dock icon is, so it SORTA works!
anyway, here's the code (plus a pre-built download):
https://github.com/nate-parrott/ball
stay tuned for project 2 of 3 tomorrow :)