WrappedDocument
As is the case with Loon, there are two data elements in the app—the location and description of whatever it is the user is interested in. WrappedDocument
is a subclass of NSDocument
. It is designed to be used with file wrappers, but it encapsulates that functionality so that nothing about file wrappers or the implementation of the data structure is visible.
The model consists of the location and description of data elements. They are defined as properties in WrappedDocument.h: documentDescription
and documentLocation
. Listing 16.3 shows the header file at this time.
#import <Cocoa/Cocoa.h>#import "JFWindowController.h"@interface JFWrappedDocument : NSDocument@property ...
Get Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X 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.