title: Retrieving UINavigationController Properties from child UIViewControllers
body: <p>I have created a subclass of <code>UINavigationController</code> called <code>CustomNavigationController</code> which tracks the level the user is currently on.</p>
  
  <p>It has a property called <code>currentLevel</code>, of type <code>NSString</code>.</p>
  
  <pre><code>// CustomNavigationController.h
  #import &lt;UIKit/UIKit.h&gt;
  @interface CustomNavigationController : UINavigationController{
      NSString *_currentLevel;
  }    
  @property (nonatomic, retain) NSString *currentLevel;
  @end
  </code></pre>
  
  <p>I'm able to retrieve the property from the child View Controllers with the following: </p>
  
  <pre><code>[(CustomNavigationController *)self.navigationController currentLevel];
  </code></pre>
  
  <p>However, the currentLevel always returns <code>(null)</code>.</p>
  
  <p>I've referenced a setter method in my view controllers which increments it:</p>
  
  <pre><code>[(CustomNavigationController *)self.navigationController setCurrentLevel:@"Level 5"];
  NSLog(@"%@",[(CustomNavigationController *)self.navigationController currentLevel]);
  //returns Level 5
  </code></pre>
  
  <p>However, when a new view controller is pushed onto the stack, or popped from the stack, my original line in the <code>viewDidLoad</code> method returns <code>(null)</code>.</p>
  
  <p>There's going to be a particular type of <code>ViewController</code> contained within my <code>CustomNavigationController</code>. This View Controller depends on knowing what level it's on. I have logic to return a particular result depending on what level the user is currently viewing on the <code>CustomNavigationController</code>.</p>