title: dismissViewControllerAnimated is not dissmissing ViewController
body: <p>So....I have a View Controller and when I press a button, another View Controller appears:</p>
  
  <pre><code>- (IBAction)searchButtonPressed:(id)sender {
      [self presentViewController:self.controllerSearch animated:YES completion:nil];
  }
  </code></pre>
  
  <p>Inside view controller number 2 is a table view and when a row is selected in a table this code runs:</p>
  
  <pre><code>NSString *phrase = nil; // Document password (for unlocking most encrypted PDF files)
  
          NSString *filePath2 = filePath; assert(filePath2 != nil); // Path to first PDF file
  
          LazyPDFDocument *document = [LazyPDFDocument withDocumentFilePath:filePath2 password:phrase];
  
          if (document != nil) // Must have a valid LazyPDFDocument object in order to proceed with things
          {
              LazyPDFViewController *lazyPDFViewController = [[LazyPDFViewController alloc] initWithLazyPDFDocument:document];
  
              lazyPDFViewController.delegate = self; // Set the LazyPDFViewController delegate to self
  
  #if (DEMO_VIEW_CONTROLLER_PUSH == TRUE)
  
              [self.navigationController pushViewController:lazyPDFViewController animated:YES];
  
  #else // present in a modal view controller
  
              lazyPDFViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
              lazyPDFViewController.modalPresentationStyle = UIModalPresentationFullScreen;
  
              [self presentViewController:lazyPDFViewController animated:YES completion:NULL];
  
  #endif // DEMO_VIEW_CONTROLLER_PUSH
          }
          else // Log an error so that we know that something went wrong
          {
              NSLog(@"%s [LazyPDFDocument withDocumentFilePath:'%@' password:'%@'] failed.", __FUNCTION__, filePath2, phrase);
          }
  </code></pre>
  
  <p>Now I am using LazyPDFKit and it comes with this delegate method:</p>
  
  <pre><code>- (void)dismissLazyPDFViewController:(LazyPDFViewController *)viewController
  {
      // dismiss the modal view controller
      [self dismissViewControllerAnimated:YES completion:NULL];
  
  }
  </code></pre>
  
  <p>I put a break point and I can see my code goes into the delegate method, but the LazyPDFViewController does not go away.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>[[[self presentingViewController] presentingViewController] dismissViewControllerAnimated:YES completion:nil];
  </code></pre>
  
  <p>but that takes me back a few view controllers to far.</p>
  
  <p>Am I missing something?</p>
  
  <p>Additional code in my first view Controller .h</p>
  
  <pre><code>@property (strong, nonatomic) UISearchController *controllerSearch;
  </code></pre>
  
  <p>and in first view controller .m</p>
  
  <pre><code>- (UISearchController *)controller {
  
      if (!_controllerSearch) {
  
          // instantiate search results table view
          UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
          LHFileBrowserSearch *resultsController = [storyboard instantiateViewControllerWithIdentifier:@"SearchResults"];
  
          // create search controller
          _controllerSearch = [[UISearchController alloc]initWithSearchResultsController:resultsController];
          _controllerSearch.searchResultsUpdater = self;
  
          // optional: set the search controller delegate
          _controllerSearch.delegate = self;
  
      }
      return _controllerSearch;
  }
  </code></pre>