Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The Foundation framework’s collection classes like NSString, NSData, NSArray, NSSet, NSDictionary, and their mutable subclasses are the most prominent public interfaces to class clusters. Other Foundation framework class cluster interface classes include NSAttributedString, NSNumber, NSNotification, NSPipe, NSScanner, and NSCharacterSet. As of Mac OS X 10.5, Core Data’s NSManagedObject class is the public interface to a class cluster. The existence of class clusters seldom affects application code that merely uses the class clusters, but it can be difficult to correctly subclass the public interfaces to class clusters. NSManagedObject is frequently subclassed in application code, but the other public interfaces to class clusters are seldom subclassed.
To create a new concrete subclass of a class cluster’s abstract public interface class, the following rules must be followed: