title: How to convert a Swift dictionary with enum keys to an NSDictionary?
body: <p>I can't convert a Swift dictionary to an <code>NSDictionary</code>. I'm using a Swift enumerate as the key of my dictionary:</p>
  
  <pre><code>enum StringEnum : String {
      case Lemon = "lemon"
      case Orange = "orange"
  }
  
  var swiftDictionary = [StringEnum: AnyObject]()
  swiftDictionary[.Lemon] = "string value"
  swiftDictionary[.Orange] = 123
  </code></pre>
  
  <p>When I try to convert it to a <code>NSDictionary</code> with the <code>as</code> keyword:</p>
  
  <pre><code>let objcDictionary: NSDictionary = swiftDictionary as NSDictionary
  </code></pre>
  
  <p>I get the compiler error:</p>
  
  <pre><code>'[StringEnum : AnyObject]' is not convertible to 'NSDictionary'
  </code></pre>
  
  <p>Can these types of dictionaries be converted or do I need to loop the Swift dictionary and create an <code>NSDictionary</code> manually?</p>