title: How to compare 2 objects for equality in Objective-C
body: <p>In Java you can write an if statement like this:</p>
  
  <p>if(object1.equals(object2)){
     // Do something....
  }</p>
  
  <p>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.</p>
  
  <p>Thank you.</p>
  
  <p>Shakeel</p>