title: How to add the Navigation Bar's view to a PopOver's PassThroughViews?
body: <p>I have a PopoverController view that allows a user to download a file.  On button press, the popOver view will expand in size, display download status, and the main view controller will be obscured by an unhidden "cover" view that has been added to the PopoverController's "passThroughViews" property so that the user can not accidentally dismiss the pop over while the file is downloading.</p>
  
  <p>My problem is that, in storyboards, my main viewController is embedded in a Navigation Controller.  I can't seem to cover the navigation controller's bar with a view in the storyboard, and if the user presses anywhere on the navigation bar then the popover will disappear and the user will lose the download's progress bar.</p>
  
  <p>How do I either cover up the navigation bar with my "cover" view, or how do I add the navigation bar's view to my popOverController's passThroughViews?</p>
  
  <p>Opening the Popover from the main viewController:</p>
  
  <pre><code>- (IBAction)openDataOptionsPopOver:(id)sender  
  {
      UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
      PopOverViewController *optionsWindow = [storyboard instantiateViewControllerWithIdentifier:@"dataOptions"];
      self.popUp = [[UIPopoverController alloc] initWithContentViewController:optionsWindow];
      [self.popUp setDelegate:self];
      [nextNavButton setEnabled:NO];               //Disabling barButtonItem on the navigationController
      optionsWindow.containerPopOver = self.popUp; //Pointer to the popover, to resize it later.
      optionsWindow.coverView = self.coverView;    //Pointer to the coverView, to (un)hide later
      [popUp presentPopoverFromRect:[sender frame] inView:[sender superview]  permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; 
  }
  </code></pre>
  
  <p>Setting the passThroughViews property inside of the PopoverViewController:</p>
  
  <pre><code>//Expands the popOver on press of "refreshFileButton" to display progressView
  -(void) explodeWindow
  {
      //setting self.navigationController.view and ...visibleViewController.view here didn't seem to work ...
      [containerPopOver setPassthroughViews:[NSArray arrayWithObjects:coverView, nil]];
      [containerPopOver setPopoverContentSize:CGSizeMake(600, 400) animated:YES];
      [titleBarItem setTitle:@"Downloading File.  Please Wait ..."];
      [refreshFileButton setHidden:YES];
      [progressView setHidden:NO];
      [downloadLabel setHidden:NO];
      [coverView setHidden:NO];
      [progressView setProgress:0.0 animated:NO];
  }
  </code></pre>
  
  <p>I've tried adding self.navigationController.view to passThroughViews with no success--it actually turns out to be a null pointer.  And I can't seem to place a UIView at any level in storyboards that will cover all my controls without obscuring the popOver.  What am I missing here?  And thanks for reading.</p>
  
  <p>Edit:
  As Aglaia points out below out, implementing the following, and avoiding passThroughViews, is probably the best way to do this.</p>
  
  <pre><code>- (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController
  {
      //Don't dismiss our popover when the view covering our controls is present
      if([coverView isHidden]){
          return YES;
      }else{
          return NO;
      }
  }
  </code></pre>