Graphics Programs Reference
In-Depth Information
If an object wants to see all of the items, it will ask the BNRItemStore for the array that
contains them. In future chapters, you'll make the store responsible for performing opera-
tions on the array, like reordering, adding, and removing BNRItem s. It will also be re-
sponsible for saving and loading the BNRItem s from disk.
Creating BNRItemStore
From the File menu, select New and then New File... . Create a new NSObject subclass
and name it BNRItemStore .
BNRItemStore will be a singleton. This means there will only be one instance of this
type in the application; if you try to create another instance, the class will quietly return
the existing instance instead. A singleton is useful when you have an object that many ob-
Search WWH ::




Custom Search