This is the code example I am uploading for Hacker School. It is an iOS application that creates random rectangles when you shake a device.