23. Frameworks

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 attempts and 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 MPRPasserGraphController and 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 ...

Get Xcode 5 Start to Finish: iOS and OS X Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.