title: How can I remove a view I added to navigationcontroller view?
body: <p>So I have a settings bar button item in my navigation controller which, when pressed from a home view controller, opens a settings vc transparent view over the home vc, so the home vc is still visible behind the settings vc. I want the nav bar to still show, so in the "HomeViewController.h"I have the following code :</p>
  
  <pre><code>-(IBAction)settingsButtonPressed:(id)sender{
      SettingsViewController *settings = [[SettingsViewController alloc]init];
      [self.navigationController.view addSubview:settings.view];
  }
  </code></pre>
  
  <p>When I want to remove the settings view, in "SettingsViewController" I tried doing :</p>
  
  <pre><code>-(IBAction)exitSettings:(id)sender{
      [self.navigationController.view removeFromSuperview];
  }
  </code></pre>
  
  <p>But when I do this and try to run the program, the program stops, and in the debug area, it just says</p>
  
  <pre><code>Thread 1: EXC_BAD_ACCESS (code = 2, address=0xb0000008)
  (lldb)
  </code></pre>
  
  <p>What am I doing wrong and how can I fix this???</p>