Shakti Chauhan Shakti Chauhan - 1 year ago 109
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 Source
var newColor = UIColor.lightGray.cgColor