title: Objective C - when should "typedef" precede "enum", and when should an enum be named?
body: <p>In sample code, I have seen this:</p>
  
  <pre><code>typedef enum Ename { Bob, Mary, John} EmployeeName;
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>typedef enum {Bob, Mary, John} EmployeeName;
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>typedef enum {Bob, Mary, John};
  </code></pre>
  
  <p>but what compiled successfully for me was this:</p>
  
  <pre><code>enum {Bob, Mary, John};
  </code></pre>
  
  <p>I put that line in a .h file above the @interface line, and then when I #import that .h file into a different class's .m file, methods there can see the enum.</p>
  
  <p>So, when are the other variants needed?</p>
  
  <p>If I could name the enum something like EmployeeNames, and then, when I type "EmployeeNames" followed by a ".", it would be nice if a list pops up showing what the enum choices are.</p>