Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Recipes 10-16 and 10-17 used rectangles to bound the displayed text, but there’s no reason on modern iOS devices not to use more challenging path shapes. Recipe 10-18 introduces code that draws the shaped text shown in Figure 10-12. To achieve this effect requires little more than changing the path from a rectangle to an ellipse. In addition, the recipe adds a little extra Quartz drawing to provide the backdrop and the outer stroke.
Figure 10-12. Using circles and ellipses (or any other shaped path) can produce eye-catching visual elements in your applications.
It’s easy to extend this approach to quite silly extremes, as demonstrated in Figure 10-13. These were a couple of sample images I created for fun while working on Recipe 10-18. They were built by creating complex path elements using mutable paths in Quartz.