title: iOS 8 -- Apply blur to navigation bar AND status bar
body: <p>I am attempting to add a blur effect to a navigation bar and a status bar. 
  My problem is that the blur goes great onto the navigation bar, but the status bar does not get blurred. </p>
  
  <p><strong>My question is: how can I extend the bounds to encompass the status bar?</strong></p>
  
  <p>I'm using the following method to create the blur effect:</p>
  
  <pre><code>- (void) addBlurEffect {
  
  CGRect bounds = self.navigationController.navigationBar.bounds;
  UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
  visualEffectView.frame = bounds;
  visualEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  [self.navigationController.navigationBar addSubview:visualEffectView];
  self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
  [self.navigationController.navigationBar sendSubviewToBack:visualEffectView];
  </code></pre>
  
  <p>}</p>
  
  <p>In my plist, I have View controller-based status bar appearance <code>YES</code></p>
  
  <p>In viewDidLoad I call a method: </p>
  
  <pre><code>- (void)configureView {
  
      // style controls
  
      self.addAirportButton.tintColor = [UIColor whiteColor];
  
      // style background image
  
      UIImageView *sidebarBackground = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sidebarBackground"]];
      self.tableView.backgroundView = sidebarBackground;
  
      // style navigation bar
  
      self.navigationController.navigationBar.barStyle = UIStatusBarStyleLightContent;
  
      // this makes navigation bar transparent
  
      [self.navigationController.navigationBar setBackgroundImage:[UIImage new]
                                                    forBarMetrics:UIBarMetricsDefault];
      self.navigationController.navigationBar.shadowImage = [UIImage new];
      self.navigationController.navigationBar.translucent = YES;
  
      // style toolbar
  
      self.navigationController.toolbar.translucent = YES;
      self.dismissAdsButton.tintColor = [UIColor whiteColor];
  </code></pre>
  
  <p>Nothing else important gets done in viewDidLoad.
  When I build this, here is what the view looks like -- it's a tableViewController embedded in a NavigationController, and I'm using the excellent SWRevealViewController as well.</p>
  
  <p>See how the status bar is not blurred:</p>
  
  <p><img src="https://i.stack.imgur.com/2bISz.png" alt="The blur is only in the navigation bar part - the status bar is not blurred"></p>
  
  <p>Any help would be really appreciated!</p>
  
  <p>UPDATE:</p>
  
  <p>See answer below. Here is a screenshot of the implemented solution:</p>
  
  <p><img src="https://i.stack.imgur.com/SM1Zo.png" alt="screenshot with solution applied"></p>