title: Swift - Drawing text with drawInRect:withAttributes:
body: <p>I have strange problem with Xcode 6.1 GM.</p>
  
  <pre><code>let text: NSString = "A"
  let font = NSFont(name: "Helvetica Bold", size: 14.0)
  
  let textRect: NSRect = NSMakeRect(5, 3, 125, 18)
  let textStyle = NSMutableParagraphStyle.defaultParagraphStyle().mutableCopy() as NSMutableParagraphStyle
  textStyle.alignment = NSTextAlignment.LeftTextAlignment
  let textColor = NSColor(calibratedRed: 0.147, green: 0.222, blue: 0.162, alpha: 1.0)
  
  let textFontAttributes = [
      NSFontAttributeName: font,
      NSForegroundColorAttributeName: textColor,
      NSParagraphStyleAttributeName: textStyle
  ]
  
  text.drawInRect(NSOffsetRect(textRect, 0, 1), withAttributes: textFontAttributes)
  </code></pre>
  
  <p>Error is in line let texFontAttributes...</p>
  
  <pre><code>Cannot convert the expression's type 'Dictionary' to type 'DictionaryLiteralConvertible'
  </code></pre>
  
  <p>This code is worked perfectly until Xcode 6.1 GM.</p>
  
  <p>When I'm tried to declare textFontAttributes as NSDictionary error message is changed to:</p>
  
  <pre><code>Cannot convert the expression's type 'NSDictionary' to type 'NSString!'
  </code></pre>
  
  <p>I have no idea how to solve this problem :(</p>