title: How to compare Enum in swift?
body: <p>in Objective-C this works fine</p>
  
  <p><img src="https://i.stack.imgur.com/WV1ns.png" alt="enter image description here"></p>
  
  <p>Can't compile this in Swift</p>
  
  <p><img src="https://i.stack.imgur.com/7Rlpe.png" alt="enter image description here"></p>
  
  <p>Or</p>
  
  <p><img src="https://i.stack.imgur.com/jPBf7.png" alt="enter image description here"></p>
  
  <p>ALAuthorizationStatus definition in IOS SDK</p>
  
  <pre><code>enum ALAuthorizationStatus : Int {
      case NotDetermined // User has not yet made a choice with regards to this application
      case Restricted // This application is not authorized to access photo data.
      // The user cannot change this application’s status, possibly due to active restrictions
      //  such as parental controls being in place.
      case Denied // User has explicitly denied this application access to photos data.
      case Authorized // User has authorized this application to access photos data.
  }
  </code></pre>