title: How to use ENUM as a parameter to a Method
body: <p>I have a type defined like this in my Prefix.pch file.</p>
  
  <pre><code>typedef NS_ENUM(NSUInteger, ServerType) {
  ServerType0 = 0,
  ServerType1,
  ServerTypeCount
  };
  </code></pre>
  
  <p>I have a method declaration like this:</p>
  
  <pre><code>+ (NSArray *)allServersForType:(enum ServerType)serverType;
  </code></pre>
  
  <p>But I am getting warning </p>
  
  <p>"Declaration of 'enum ServerType' will not be visible outside of this function"</p>
  
  <p>and worse when I try to pass it like this:</p>
  
  <pre><code>    NSArray *servers = [Server allServersForType:ServerTypeCount];
  </code></pre>
  
  <p>I get an error "Argument type 'enum ServerType' is incomplete"</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Rob</p>