Paul Heinemeyer Paul Heinemeyer - 1 year ago 129
Swift Question

How to compare border color of a cell in collection view (iOS, swift)

I want to compare the color of my cells border like this:

if(cell.layer.borderColor == UIColor.blackColor().CGColor)

But i get a error.

Thank you

Answer Source


CGColorEqualToColor(cell.layer.borderColor, UIColor.blackColor().CGColor)

You can't compare with the == operator two CGColor

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download