Database Reference
In-Depth Information
We need to make sure we change the Class setting in the latest data model
so Core Data uses our subclass rather than the default NSManagedObject . See
Figure 35, Changing the entity's class , on page 156 .
Figure 35—Changing the entity's class
Implementing the Metadata Method
The goal of this metadata file is to contain just enough information to populate
Spotlight and Quick Look but not so much information that the files become
large and cumbersome. We must pretend there will be thousands of these
files (even if in reality that would be impractical), and we do not want to impact
the users' performance or their hard drive capacity. For our metadata files,
we really need only the following information:
• The name of the recipe
• The number of people it serves
• The image for the recipe
• The last time it was served
• The description of how to prepare it
Most of that list is very light—just text. However, the image is probably too
large to cram into the plist file, especially since we cannot be sure how large
that file will be. In addition, it would complicate the file format by including
binary data. Therefore, we will put in the path of the image instead of the
actual image. Since the image is stored on disk, we just access that copy.
 
 
 
Search WWH ::




Custom Search