Shakti Chauhan Shakti Chauhan - 1 year ago 187
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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download