Shakti Chauhan Shakti Chauhan - 1 month ago 15
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