A Graphing View

I’ve begged the question of what MPRPassCompletionView is. Create a new Objective-C subclass of NSView with that name. You get header and implementation files. MPRPassCompletionView will use the delegate pattern to pull its data from the model. That requires a @protocol to define the method through which the delegate will provide the data. Put this in MPRPassCompletionView.h:

#import <Cocoa/Cocoa.h>@class MPRPassCompletionView;@protocol MPRPassCompletionDelegate <NSObject>- (NSManagedObject *) MPRPassCompletion: (MPRPassCompletionView *) view                         gameAtIndex: (NSUInteger) index;@end@interface MPRPassCompletionView : NSView@property(nonatomic, assign) IBOutlet id<MPRPassCompletionDelegate> ...

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.