O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Printing to RaiseMan

As an example, you will add printing to your RaiseMan app. You will print the name and expected raise for as many people as will fit on the paper size that the user selects from the Print panel (Figure 27.2).

Figure 27.2  Completed application

Completed application

To do so, you will create a view that does the printing. Instead of making the view big enough to display all the people simultaneously, you will simply note which page the system is printing and draw only the names on that page in drawRect(_:).

Open the RaiseMan project from Chapter 26.

Create a new Cocoa Class file containing a class called EmployeesPrintingView ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required