title: Close popover - Objective-c
body: <p>Good Day,</p>
  
  <p>I'm having a problem to close a popover after selecting a line (UITableView). I've tried the following methods, but were unsuccessful.</p>
  
  <pre><code>[self dismissModalViewControllerAnimated:YES];
  
  iMAPClientesPesquisar *a = [[iMAPClientesPesquisar alloc] init];
      [a.popover dismissPopoverAnimated:YES];
  </code></pre>
  
  <p>I'm calling my popover as follows:</p>
  
  <pre><code>- (IBAction)Filtro:(id)sender {
  
      iMAPClientesFiltro *ClientesFiltro = [[iMAPClientesFiltro alloc] init];
      popover = [[UIPopoverController alloc] initWithContentViewController:ClientesFiltro];
      [ClientesFiltro release];
      [popover setPopoverContentSize:CGSizeMake(132, 132)];
      [popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
  }
  </code></pre>
  
  <p>Any suggestion will be greatly appreciated.</p>