Coding conventions

Coding conventions are a set of guidelines that help to ensure efficiency and consistency in API usage and clarity and consistency in API naming. If you following the usage conventions in your code, you are less likely to experience problems such as runtime exceptions. If you adhere to the naming conventions, any methods, functions, constants, or other symbols that you declare will be better understood by developers who need to work with your code.

The methods defined in Cocoa frameworks—for example, Foundation, AppKit, and UIKit—behave in certain ways in different circumstances. For example:

Here is a sampling of API naming conventions:

Prerequisite Articles

    (None)

Related Articles

Definitive Discussion