title: Xcode 6.1 Attribute Dictionaries in Swift
body: <p>After upgrading to Xcode 6.1 Beta 2 from Xcode 6 Beta 7, the following no longer works:</p>
  
  <pre><code>let font = UIFont(name: "Arial", size: 16)
  let colour = UIColor.redColor()
  let attributes = [NSFontAttributeName: font, NSForegroundColorAttributeName: colour]
  </code></pre>
  
  <p>I have tried specifically declaring the dictionary as </p>
  
  <pre><code>let attributes: [NSString : AnyObject] = [NSFontAttributeName: font, NSForegroundColorAttributeName: colour]
  </code></pre>
  
  <p>but I am receiving the error "Cannot convert ... 'Dictionary' to 'NSString!'". Declaring the key as <code>NSString!</code> rather than <code>NSString</code> complains that <code>NSString!</code> is not hashable. Any clues?</p>