April 2015
Intermediate to advanced
556 pages
17h 47m
English
In Chapter 17, we covered drawing shapes with NSBezierPath. A natural progression from there would be to draw text. In this chapter you will add support for drawing text on the die face to extend the range to [0, 9]. At the end of this chapter, your application will look like Figure 20.1.
Figure 20.1 Completed application
Overall, the class NSFont has only two types of methods:
class methods for getting the font you want
methods for getting metrics on the font, such as letter height
The following are commonly used methods in NSFont:
class func systemFontOfSize(fontSize: ...
Read now
Unlock full access