tags:

views:

45

answers:

3

I want to create an enum that is global. I've seen examples where they are declared within a method, but i want mine to be accessible by the whole class or even by the whole project (if possible)

What is the syntax for this?

A: 

If you want the whole project to have access, put it in your class's .h file. If you want access in your class, put it in your class's .m file.

Stephen Canon
+2  A: 

Put it at the file level, inside a header.

zneak
A: 

If you want to define it for the entire project without importing a header everytime you could put it in the precompiled prefix header. That's the file that's named something like "???Prefix.pch".

No one in particular