title: Need help understanding how the << bitwise operator works in Objective-C
body: <p>I was looking into how one uses the UISwipeGestureRecognizer class in Objective-C and happened to run across an enum named UISwipeGestureRecognizerDirection.</p>
  
  <p>Apple defines this as:</p>
  
  <pre><code>typedef enum {
     UISwipeGestureRecognizerDirectionRight = 1 &lt;&lt; 0,
     UISwipeGestureRecognizerDirectionLeft  = 1 &lt;&lt; 1,
     UISwipeGestureRecognizerDirectionUp    = 1 &lt;&lt; 2,
     UISwipeGestureRecognizerDirectionDown  = 1 &lt;&lt; 3
  } 
  </code></pre>
  
  <p>I wasn't sure how the compiler interpreted the above, specifically the &lt;&lt; operator. From looking it up, it appears to be the bitwise shift left - But I am afraid I dont understand how the operator works above.</p>
  
  <p>Any direction is greatly appreciated. Thanks in advance!</p>