jeudi 2 juillet 2020

How to compare three Color in SwiftUI

I have three Colors and I want to compare them. Should I make Color conform to Equatable protocol?

Code :

if Color.red == Color.green == Color.blue  {
   // do something
}

Aucun commentaire:

Enregistrer un commentaire