title: Enumeration in iphone is not working
body: <p>i am developing an iphone application in which i have 3 classes => main class , abc class, pqr class. On main view , i have imageview on which i am displaying image. when user touch at the center of image on main view , new view will be pushed (depending on condition mentioned below)</p>
  
  <p>a)  if user came from <strong>abc view</strong> then 
  <strong>new view will not be pushed</strong>  </p>
  
  <p>b) if user came from <strong>pqr view</strong> then i 
  <strong>have to push new view</strong> .</p>
  
  <p>My problem is how can i detect from which view user came to main view.</p>
  
  <p>I create 1 class in which i have following code in .h file</p>
  
  <pre><code>typedef enum {
          abcViewSelected,
          pqrViewSelected
  } SelectedViewType;
  
  @interface Enumeration : NSObject {
      SelectedViewType selectedViewType;
  }
  
  @property(nonatomic) SelectedViewType selectedViewType;
  </code></pre>
  
  <p>In . m file i have </p>
  
  <pre><code>@synthesize selectedViewType;
  </code></pre>
  
  <p>When user select table cell from abcView &amp; pqrView , i am pushing main view &amp; setting view type in didSelectRowAtIndexPath as follows :- </p>
  
  <pre><code>enumObj.selectedViewType = abcViewSelected;
  
  enumObj.selectedViewType = pqrViewSelected;
  </code></pre>
  
  <p>In main view's touchBegan method i am compairing which view is selected by writing this</p>
  
  <pre><code>if(enum.selectedViewType == pqrViewSelected) =&gt; push new view 
  </code></pre>
  
  <p>else do nothing.</p>
  
  <p>But this is not compairing &amp; in none of case new view is pushed.  I have imported all the required header files everywhere.</p>
  
  <p>Plz help me ....Thanks in advance.</p>