20. A Custom View for OS X

Let’s extend Mac Passer Rating by one more step, and in the process see how to handle custom classes in Interface Builder. In this chapter, I’ll add another popover, to be shown when you double-click a row in the MPRPasser table. The popover will show a simple scrolling bar graph comparing MPRPass attempts and completions, by game.

You already know how to create and populate an NSPopover. The popover needs an NSViewController. It turns out that the view controller will have to do a little bit of work, so you’ll need to use File → New → File. . . (Image N) to create an Objective-C subclass of NSViewController named MPRPasserGraphController ...

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.