title: how to pass enum as parameter to function in objectivec
body: <p>The header file looks like:</p>
  
  <pre><code>enum RatingsEnum
  {
      userRating,
      criticRating,
  };
  
  @interface SFMovie : NSObject
  
  - (NSNumber *)getRating:(NSDictionary *)movieDic :(enum RatingsEnum) rating;
  
  @end
  </code></pre>
  
  <p>How can I use this method getRating? I am not sure how to pass the enum. My calling code:</p>
  
  <pre><code>- (void) testGetCriticRatingMethod{
  
      NSMutableDictionary *ratingDictionary = [[NSMutableDictionary alloc]init];
      [ratingDictionary setObject:@"Certified Fresh" forKey:@"critics_rating"];
      [ratingDictionary setObject:@"70" forKey:@"critics_score"];
      [ratingDictionary setObject:@"Certified Fresh" forKey:@"audience_rating"];
      [ratingDictionary setObject:@"87" forKey:@"audience_score"];
      SFMovie *movie = [[SFMovie alloc]init];
      enum RatingsEnum ratings;
      NSInteger userRating = [movie getRating:ratingDictionary rating:userRating];
  }
  </code></pre>
  
  <p>This produces the following warning:
  <em>No visible @interface for 'SFMovie' declares the selector 'getRating:rating:'</em></p>
  
  <p>Can somebody guide me to a good enum tutorial? Thank you all.</p>