I have strange problem with Xcode 6.1 GM.
let text: NSString = \"A\"
let font = NSFont(name: \"Helvetica Bold\", size: 14.0)
let textRect: NSRect = NSMakeRe
The problem is that font is optional because the convenience contructors now return optional values, so font needs to be unwrapped to be a value in your dictionary:
if let actualFont = font {
let textFontAttributes = [
NSFontAttributeName: actualFont,
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: textStyle
]
text.drawInRect(NSOffsetRect(textRect, 0, 1), withAttributes: textFontAttributes)
}