-1

I just moved to iOS 9 and noticed some new warnings on my old code:

description.becomeFirstResponder == YES;

Display warning 'Equality comparison result unused'

How can I handle this Warning.

Thank You!

Shriram Kadam
  • 394
  • 1
  • 4
  • 20

1 Answers1

3

You probably meant to assign, as in:

description.becomeFirstResponder = YES;
                                 ^

(== is the equality comparison operator).

The compiler is complaining as the result of the comparison wasn't being used, as it would be in:

if (description.becomeFirstResponder == YES) { /* do something */ }
Droppy
  • 9,691
  • 1
  • 20
  • 27