转载自:http://www.bit-101.com/blog/?p=1793
See this note.
In part 1,
we created a Ball class which contained position, velocity, radius, and a color. And we set up a timer to update the ball’s position based on its velocity and bounce off the walls.
Now let’s render that ball to the screen.
Rendering is done in a view class, which is of type UIView or a sublcass of UIView. when you create a View-Based application, XCode automatically sets up a generic view of type UIView. Often thi......
阅读全文