- Joined
- Mar 10, 2010
- Messages
- 10
- Reaction score
- 0
- Points
- 1
- Location
- Burbank, CA
- Your Mac's Specs
- iMac i5 27" OSX 10.6.2
Hi all,
Not sure if this is the proper place for these questions, but I have gotten great help here in the past and thought I'd try.
I am having a hard time with declaring and using enums in my XCode project.
My declaration is going in the .h file, just above the @implementation line:
That compiles just fine. But when I try to access it in an instance method within the .m file:
I don't get CodeSense, and get errors. I am obviously not doing this properly, but I cannot find a reference on HOW to do it.
Can someone guide me?
Cheers,
Chris
Not sure if this is the proper place for these questions, but I have gotten great help here in the past and thought I'd try.
I am having a hard time with declaring and using enums in my XCode project.
My declaration is going in the .h file, just above the @implementation line:
Code:
typedef enum {
EASY,
NORMAL,
HARD
} DifficultyLevel
That compiles just fine. But when I try to access it in an instance method within the .m file:
Code:
switch ([self difficultyLevel]) {
case DifficultyLevel.EASY:
...
}
I don't get CodeSense, and get errors. I am obviously not doing this properly, but I cannot find a reference on HOW to do it.
Can someone guide me?
Cheers,
Chris