title: How to use NS_OPTIONS defined in Obj-C class in Swift
body: <p>I have to use an Objective-C static library in my Swift project. Anything else goes well but the <code>NS_OPTIONS</code> enum defined in the Objective-C header file, like this:</p>
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  typedef NS_OPTIONS(NSUInteger, MyOption) {
      MyOptionNone   = 0,
      MyOptionTop    = 1 &lt;&lt; 0,
      MyOptionLeft   = 1 &lt;&lt; 1,
      MyOptionBottom = 1 &lt;&lt; 2,
      MyOptionRight  = 1 &lt;&lt; 3
  };
  
  @interface MyObjcClass : NSObject
  
  @end
  </code></pre>
  <p>and then in the .swift file, how could I use this enum in a switch-case?</p>
  <p>EDIT:
  I use <code>MyOption</code> in my Swift class:</p>
  <pre><code>let option1: MyOption = .Top
  let option2: MyOption = .Bottom
  let value = option1 &amp; option2
  </code></pre>
  <p>then I get compile error:</p>
  <pre><code>Binary operator '&amp;' cannot be applied to two `MyOption` operands
  </code></pre>
  <p>How to solve this problem?</p>