O'Reilly logo

Xcode 5 Start to Finish: iOS and OS X Development by Fritz Anderson

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

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 ...

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