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
In XCode 12, Swift 5.3. i was not able to find the draw method for String object. After i manually cast to NSString, it worked for me.
let text: String = "XXX" (text as NSString).draw(in: rect withAttributes: attributes)