0

I want to compare if the background color of a UITextField is at it's default color.

Something like:

if ([blankField.backgroundColor isEqual:nil] 
       && [colorField.backgroundColor isEqual:nil])
{
}
alexm
  • 103
  • 7
  • http://stackoverflow.com/questions/10942239/comparing-two-uicolors-is-not-working-in-the-first-time – iDev Dec 24 '12 at 20:59

1 Answers1

0

You can try to sample a portion of each text field and tell if they are the same as each other. Look at this link:How does one compare one image to another to see if they are similar by a certain percentage, on the iPhone? this link talks about how to compare two images to see if they are similar. Hope this helps.

Community
  • 1
  • 1
Yo_Its_Az
  • 2,043
  • 2
  • 18
  • 25