title: "Testing Class Equality" in Objective-c
body: <p>I am having problem understanding this part of "Testing Class Equality" which is defined in apple guide.</p>
  
  <blockquote>
    <p>In a dynamically-created subclass, the class method is typically overridden such that the subclass masquerades as the class it replaces. When testing for class equality, you should therefore compare the values returned by the class method rather than those returned by lower-level functions. Put in terms of API, the following inequalities pertain for dynamic subclasses:</p>
  
  <pre><code>[object class] != object_getClass(object) != *((Class*)object)
  </code></pre>
    
    <p>You should therefore test two classes for equality as follows:</p>
  
  <pre><code>if ([objectA class] == [objectB class]) { //...
  </code></pre>
  </blockquote>