There’s a few different ways to create constants in Objective-C, but the easiest way is to use #define statements.
To start, create a new header file. This is where we’ll store all the constants. Name it something original like “Constants.h”.
Here’s a sample file with a few constants:
To use these constants in your project, you need to import your header file in each implementation file (*.m) where you’ll be referencing them.
If you’d like to go beyond simple preprocessor directives and implement a full blown Constants.h/m pair, then check out this thread over at Stack Overflow.