Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
XCode enum help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Raconteur" data-source="post: 1064853" data-attributes="member: 147076"><p>Ok, making more sense.</p><p></p><p>I see I do not need the typedef, but then how would I create the enum for use by the class as a whole?</p><p></p><p>Should I just declare it as an assigned variable in the header like:</p><p>[CODE]</p><p>@interface ...</p><p> int aVar;</p><p> bool anotherVar;</p><p> enum {</p><p> EASY,</p><p> NORMAL,</p><p> HARD</p><p> }</p><p>...</p><p>[/CODE]</p><p></p><p>Is that the proper way to do it?</p></blockquote><p></p>
[QUOTE="Raconteur, post: 1064853, member: 147076"] Ok, making more sense. I see I do not need the typedef, but then how would I create the enum for use by the class as a whole? Should I just declare it as an assigned variable in the header like: [CODE] @interface ... int aVar; bool anotherVar; enum { EASY, NORMAL, HARD } ... [/CODE] Is that the proper way to do it? [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
XCode enum help
Top