Monthly Archives: May 2010
Chapter 14: Notifications
The Notification pattern is called the Observer pattern outside of the Cocoa community. Head First Design Patterns covers the Observer pattern, and I did its example in C++. You’ve probably used yourself, since it’s covered in Hillegass’s Cocoa Programming for … Continue reading
Chapter 13: Singleton
The Singleton Pattern seeks to control access to a unique resource by leaving it under the control of a class that by design can have only one instance. Typically, the class stores a pointer to the unique instance as a … Continue reading
Chapter 11: Archiving and Unarchiving
Storing data on disk and getting it back into memory is one of the basics tasks of almost all applications. Cocoa provides developers some simple and powerful ways of accomplishing these tasks, through the NSArchiver and NSUnarchiver classes. They will … Continue reading