O'Reilly logo

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

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

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