title: Objective-C: How to avoid unintended calls to private superclass methods with identical name?
body: <p>I'm trying to avoid duplicate code in various <code>-(id)init</code> flavors of a class, i.e. <code>init</code>, <code>initWithFrame</code>, <code>initWithCoder</code>, etc. by defining a private method that is named <code>commonConstruct</code>.</p>
  
  <p>This method does the heavy lifting common to all init method flavors and gets called by the <code>init</code> constructor.</p>
  
  <p>The issue i have now is that in derived classes, using the same naming convection for the initializer helper ("commonConstruct") the base class will call the derived class's <code>commonConstruct</code>, though it is <code>invisible</code>, i.e. declared in the <code>.m</code> file, not in the <code>.h</code> file.</p>
  
  <p>However, the runtime finds the overloaded commonConstruct and executes that instead of its own member function.</p>
  
  <p>Is there any other way than using a different name for the initializer helper in each subclass ?</p>
  
  <p>In other words: Is there a way of making <code>Objective-C</code> member functions that are "non-virtual", i.e. don't have late (runtime) but compile-time binding?</p>