In Chapter 20, “A Custom View for OS X,” you constructed a bar-graph view that is isolated from the code inside Mac Passer Rating. Yes, its method selectors refer to games, and the drawing code pulls in properties with names like
completions, but the code itself doesn’t link to any code in the rest of the application.
Once again I’m going to pretend that
MPRPassCompletionView form a package that I’d want to reuse. I did the same thing with
passer-rating in Chapter 6, “Adding a Library Target.”
But there’s a difference this time: The graph view requires a non-code resource,
MPRPasserGraphController.xib, to link the view to its controller and to set drawing parameters. If I were building ...