title: Objective-C inheritance; calling overridden method from superclass?
body: <p>I have an Objective-C class that has a method that is meant to be overridden, which is uses in a different method. Something like this:</p>
  
  <pre><code>@interface BaseClass
  - (id)overrideMe;
  - (void)doAwesomeThings;
  @end
  
  @implementation BaseClass
  - (id)overrideMe {
      [self doesNotRecognizeSelector:_cmd];
      return nil;
  }
  - (void)doAwesomeThings {
      id stuff = [self overrideMe];
      /* do stuff */
  }
  @end
  
  @interface SubClass : BaseClass
  @end
  
  @implementation SubClass
  - (id)overrideMe {
      /* Actually do things */
      return &lt;something&gt;;
  }
  @end
  </code></pre>
  
  <p>However, when I create a <code>SubClass</code> and try to use it, it still calls <code>overrideMe</code> on the <code>BaseClass</code> and crashes due to <code>doesNotRecognizeSelector:</code>. (I'm not doing a <code>[super overrideMe]</code> or anything stupid like that).</p>
  
  <p>Is there a way to get <code>BaseClass</code> to call the overridden <code>overrideMe</code>?</p>