title: Modal window not being dismissed
body: <p>I have two programmatically created buttons you can see in my viewDidLoad method.  On the modal window I have a button that calls the cancelSearch method via a delegate.  When I place a breakpoint on my cancelSearch method it is hit, so I know my delegate is set up correct, but even though it calls this line [self dismissViewControllerAnimated:YES completion:nil]; it's not actually closing the modal window.</p>
  
  <p>The code below is all from my main controller view.</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      UIBarButtonItem *actionButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self  action:@selector(showActionMenu:)];
      actionButton.style = UIBarButtonItemStyleBordered;
  
      UIBarButtonItem *searchButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:self  action:@selector(showSearchMenu:)];
      searchButtonItem.style = UIBarButtonItemStyleBordered;
  
      UIToolbar* toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 103.0f, 44.01f)];
      NSArray* buttons = [NSArray arrayWithObjects:actionButton, searchButtonItem, nil];
      [toolbar setItems:buttons animated:NO];
      self.navigationItem.title = @"Census Management";
      self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:toolbar];
  
  
      [[RKClient sharedClient] get:@"censusmanagement" delegate:self]; 
  }
  
  - (IBAction)showActionMenu:(id)sender
  {
      [self performSegueWithIdentifier: @"CMActionSegue" sender: self];
  }
  
  - (IBAction)showSearchMenu:(id)sender
  {
      ehrxCMSearchView *search = [[self storyboard] instantiateViewControllerWithIdentifier:@"cmSearch"];
      search.selectedOptions = self.selectedOptions;
  
      search.delegate = self;
  
      [self.navigationController pushViewController:search animated:YES];
  }
  
  - (void)cancelSearch:(ehrxCMSearchView *)controller
  {
      [self dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>