Pie clock
The next clock is a little more complicated, so let's take a look at the finished result before we start to look at how we will go about putting it together:
The clock is showing the time at 11.42. The hour text rotates to show the hours, and the segmented face shows the minutes.
Note
This clock was inspired by a real clock that I picked up in Covent Garden once; the hour hand stays in the same position while the whole clock rotates. It's completely impractical, and very cool.
As you might guess, this design involves some amount of drawing on top of previous drawings, as well as a small dose of text rotation.
Creating a custom view with Core Graphics
In this section, we'll move a little closer to the metal, making direct use of some Core Graphics functions.
You are leaving the green zone. From now on, it's just you and the graphics; no AppKit safety harness. If you like hot chili and strong coffee, you'll love CG.
As is generally the case with the core libraries, Core Graphics requires...