Paul Heinemeyer Paul Heinemeyer - 3 months ago 19
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

Use:

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

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

Comments