Chapter 19. A Custom View for Mac OS X

In This Chapter

• Creating a custom NSView subclass

• Creating wrapping views

• Editing custom views in Interface Builder

Let’s extend Mac Passer Rating by one more step, and in the process see how to handle custom classes in Interface Builder (IB). In this chapter we’ll add another popover, to be shown when you double-click a row in the Passer table. The popover will show a simple scrolling bar graph comparing pass 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 must do a little bit of work, so you need to use FileNewFile... (N) to create an Objective-C subclass of NSViewController ...

Get Xcode® 4 Unleashed, Second Edition 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.