title: How to use enum in objective c
body: <p>I am abit stuck on how I use enum's in my project, I have set up the the enum object but I would like to know how to use it.</p>
  
  <p>This is what I have done so far</p>
  
  <p><strong>//.h</strong></p>
  
  <pre><code>   typedef enum {
        ktUnknown=0, ktSingleSided=1, ktDoubleSided=2, ktTripleSingleSided=3
      } TICKType;
      //..
      TICKType Type;
      //..
      @property (assign) TICKType Type;
  </code></pre>
  
  <p>Now I would like to know how to check if an integer equals one of those enum types in an if statement.</p>
  
  <p>this is kinda what im doing obviously not working</p>
  
  <pre><code>if (myobj.objsval == Type.ktSingleSided) {
  
  }
  </code></pre>
  
  <p>but unfortunately this is not working. any help figuring this out would be greatly appreciated.</p>