I am using a light blue CGColor
and now I want to use this exact color as the background of a UIButton
.
How can I convert the CGColor
to UIColor
?
Get the UIColor from the CGColor using UIColor(cgColor: ...):
let uiColor = UIColor(cgColor: cgColor)
then assign it as a background color to your button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With