Shakti Chauhan Shakti Chauhan - 4 months ago 48
Objective-C Question

Converting UIColor to CGColor in swift

This is the Obj-C code:

CGContextSetStrokeColorWithColor(context, [[UIColor lightGrayColor] CGColor]);


How do I write it in swift.

Answer
var newColor = UIColor.lightGray.cgColor