objc-guide

Naming

Convention

Class names should contain a noun that signifies what the class represents or what functionality it provides. The class name should have an appropriate three letter prefix.

Rationale

Using nouns helps identify the specific information and functionality provided by a given class.

Class names in Objective-C share a process global namepsace. Three letter prefixes are a mechanism for namepsacing classes to reduce the chance of name collisions, resulting in undefined behavior. Do not use two letter prefixes, as they are reserved for system use.

Examples

@interface Object : NSObject // bad: no three letter prefix
@end

@interface XYZObject : NSObject // good: XYZ three letter prefix
@end

@interface XYZColorful : NSObject // bad: colorful is not a noun
@end

@interface XYZColorfulPalette : NSObject // good: palette is a noun
@end