Decrease size of / mask / move offscreen CGRect

I am trying to create an app in xcode that will make a CGRect, tie the shape to a timer and then to create the appearance that the shape is slowly draining from the bottom of the screen (off screen), similar to if it were a liquid in a container with a hole in the bottom or the top of an hourglass. I found an example project on github that creates a path and fills in an arc with a color over a circle called SRCountdownTimer, but I can't figure out the best way to achieve what I want. I have no problem creating a class that will create the fullscreen CGRect, and fill it in with color and also tying it to a countdown timer using elapsedTime / totalTime. But as far as creating the illusion of the rectangle draining, I'm kind of lost. Any specific help or suggestions would be appreciated. Thanks!