title: How can I get a reference from UIBarButtonItem to the containing navigationController?
body: <p>I am in a <strong>barButtonItem handler</strong> method, and I need the reference to the navigation controller. But I do <strong>not have a stored reference</strong> to <strong>navigation controller</strong>. Any idea?</p>
  
  <pre><code>#import "ReportViewController.h"
  #import "CenterViewAnimationUtility.h"
  
  @implementation ReportViewController
  
  - (void)viewDidLoad
  {
      UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
      [button addTarget:[CenterViewAnimationUtility class] action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
  }
  
  //next file ..
  
  #import "CenterViewAnimationUtility.h"
  
  @implementation CenterViewAnimationUtility
  
  + (void)buttonPressed:(UIBarButtonItem *)barButtonItem {
  
      UINavigationController *navigationController = barButtonItem.//..
  }
  </code></pre>