How to compare 2 objects for equality in Objective-C

Posted by shakeelw on Stack Overflow See other posts from Stack Overflow or by shakeelw
Published on 2010-05-12T08:07:47Z Indexed on 2010/05/12 8:14 UTC
Read the original article Hit count: 363

Filed under:
|
|

In Java you can write an if statement like this:

if(object1.equals(object2)){ // Do something.... }

How can I code the same logic in Objective-C? I basically want to compare 2 of any one type of objects, such as 'Text Fields', 'Text Views', etc.

Thank you.

Shakeel

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone