title: How to write methods that should only be used within the class itself and are able to access ivars
body: <p>I have a class which has some methods that are only to be used within the class itself. These methods exist because I have a three-step process for the graphics work I'm doing, but I only want instances of the class to access the final result of those calculations, in a simplified example:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface GraphicsWorld : NSObject
  
  @property(nonatomic, strong) NSMutableArray *objects;
  @property(nonatomic, strong) NSMutableArray *adjustedObjects
  
  /* three methods I'll never use outside of this class
  
   I want to find a way to get replace these methods.
   */
  -(void) calcTranslation;
  -(void) calcRotation;
  -(void) calcPerspective;
  
  /* the one method I'll use outside of this class */
  -(NSMutableArray *) getAdjustedObjects;
  
  @end
  </code></pre>
  
  <p>I could define c-functions just outside of my implementation for this, but then they wouldn't have access to the properties:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import "GraphicsWorld.h"
  
  void calcTranslation()
  {
      // I'm useless because I can't access _objects.
  }
  
  void calcRotation()
  {
      // Hey, me too.
  }
  
  void calcPerspective()
  {
      // Wow, we have a lot in common.
  }
  
  @implementation GraphicsWorld
  
  -(NSMutableArray *) getAdjustedObjects
  {
      calcTranslation();
      calcRotation();
      calcPerspective();
  
      return adjustedObjects;
  }
  
  @end
  </code></pre>