I’m using the line of code below but it doesn’t seem to be doing what I’m expecting, which is to find out if the title text color for the button title is green. However, I’m not getting a compile error, so it must be doing something:
if ([sfield1 currentTitleColor] != [UIColor greenColor])
Does someone know if there is a way to do this kind of compare? Thanks.
You can try using –
But you need to be careful while using it if there is a difference in colour model, then it might fail.