28. Managers

Managers are classes that manage instances of other classes. Examples of Cocoa manager classes include NSFileManager, NSFontManager, NSInputManager, and NSLayoutManager. Managers simplify the creation and management of reusable resources such as fonts and encapsulate implementation details. For example, the NSFileManager class provides methods for managing files from file systems as diverse as DOS FAT, Apple HFS+, Network File System, UFS, and ISO 9660 without requiring any system-specific code in applications. Some managers also act as controllers within the Model View Controller pattern.

Motivation

Offer a uniform interface for managing the instantiation of and access to a group of related objects. Many managers use and extend ...

Get Cocoa Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.