Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Class Clusters > Examples in Cocoa

Examples in Cocoa

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.

Subclassing a Class Cluster’s Public Interface Class

To create a new concrete subclass of a class cluster’s abstract public interface class, the following rules must be followed:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint