title: Objective C Class Extension Method
body: <p>As far as I have understood , class extensions are used to declare private methods in objective C . But I found this happening.</p>
  
  <p>//Person.m</p>
  
  <pre><code>@interface Person()
  
  - (void)someMethod;
  
  @end
  
  @implementation
  
  - (void)someMethod
  {
      NSLog(@"base class method");
  }
  </code></pre>
  
  <p>If I subclass this and declare the same function in the .h file of the subclass.
  //SubPerson.h</p>
  
  <pre><code>@interface SubPerson : Person
  
  - (void)someMethod;
  
  @end
  </code></pre>
  
  <p>I do not provide a definition for this method in the .m file (SubPerson.m)</p>
  
  <p>I then create a derived class instance and call the method someMethod() in some file and I observe that the base class method is called.
  Can someone please explain ?</p>