This is the Obj-C code:
CGContextSetStrokeColorWithColor(context, [[UIColor lightGrayColor] CGColor]);
How do I write it in swift.
// Original answer.
var newColor = UIColor.lightGrayColor().CGColor
// Swift 3 version
var newColor = UIColor.lightGray.cgColor