title: Getting an "Enumeration values 'x', 'y' and 'z' not handled in switch" message when, in fact, these enumerations are being handled. What's going on?
body: <p>I have an enumeration defined as such:</p>
  
  <pre><code>//ModelClass.h
  typedef enum { Automatic, Manual, Off } MyModes;
  </code></pre>
  
  <p>Later, in a ViewController, I have a switch statement within a method that switches on a variable of my enumeration type.  My switch statement looks as follows:</p>
  
  <pre><code>//MyViewController.m
  #import "ModelClass.h"
  
  -(void) dryer:(MyClass *)m didChangeMode:(MyModes) newMode
  {
  
      //Code within an instance method, utilizing the above enumeration
      switch (newMode) //newMode is an instance of MyMode enum.
      {
      case Automatic:
          //Some code...
          break;
      case Off:
          //Some code...
          break;
      case Manual:
          //Some code...
          break;
      }
  }
  </code></pre>
  
  <p>The above switch statement was copy/pasted from my code and all I did was replace the functional code with the <code>//Some code...</code> comments.</p>
  
  <p>XCode keeps giving me a warning at the <code>switch (newMode)</code> line stating "Enumeration values 'Automatic', 'Manual', and 'Off' not handled in switch".</p>
  
  <p>Furthermore, at each <code>case</code> statement, I'm getting an error stating "Expression is not an integer constant expression", even though it should be since it's an enumeration.</p>
  
  <p>How can I fix this?  The odd thing is that I have another enumeration in the <code>ModelClass</code> header (consisting of 4 enumerated items) defined on the following line after <code>MyModes</code> enumeration and, in my view controller, I have another method that is doing the exact same type of switch/case operation.  I am not getting a single warning or error on that method, using that enumerator.</p>
  
  <p>What could be going on?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I put the method declaration within the code snippet.  The <code>newMode</code> variable is a parameter to the method.  Furthermore, the aforementioned, other enumerator that is working correctly is also being passed into the other method as a parameter.</p>