title: Accessing UINavigationController from rootVC Subview (subview loaded from Nib)
body: <p>The main ViewController is embedded in a UINavigationController subclass, and the VC has a subview that is loaded from a nib. The subview is called MenuView, and contains UIButtons that will link to other VCs.</p>
  
  <p>To keep my main ViewController less unruly, I have put all these buttons into a subview that loads from a nib that animates the menu opening and closing.</p>
  
  <p>However, I would like to present other view controllers from these, sometimes "Modally", sometimes "Show". What I have done seems to work, but I just want to know if this is alright, or if I have caused some unwanted effects that I'm unaware of (like a strong reference cycle that would cause a memory leak, or something). Or is there a better way to do this?</p>
  
  <p>Some code:
  In MenuView.swift</p>
  
  <pre><code>class MenuView: UIView {
      var navigationController = CustomNavigationController()
  
      func combinedInit(){
          NSBundle.mainBundle().loadNibNamed("MenuViewXib", owner: self, options: nil)
          addSubview(mainView)
          mainView.frame = self.bounds
      }
  
      @IBAction func optionsAction(sender: AnyObject) {
          self.navigationController.performSegueWithIdentifier("presentOptions", sender: self)
      }
  </code></pre>
  
  <p>In ViewController.swift</p>
  
  <pre><code>        menuView.navigationController = self.navigationController as! CustomNavigationController
  </code></pre>