title: UIPrintInteractionController presentFromRect issue
body: <p>Im showing the AirPrint options from a UIButton using the presentFromRect method, everything is working as expected, but if i keep pressing the button fast enough my app crashes with EXC_BAD_ACCESS, probably because of the popover not being release.</p>
  
  <p>Im using Xcode 4.2 with ARC enabled.</p>
  
  <p>Any help would be great! </p>
  
  <p><strong>Update 2: The problem only occur on iOS 5 simulator, iPad 4.3 simulator works as expected.</strong></p>
  
  <p>Update:</p>
  
  <p>Here is the real problem:</p>
  
  <p><em><strong></em>* Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'</strong></p>
  
  <p>Here is the code:</p>
  
  <p>Here I'm calling my method:</p>
  
  <pre class="lang-c prettyprint-override"><code>PrintUtils* printUtils = [[PrintUtils alloc] init];
  printUtils.delegate = self;
  [printUtils setHeader:@"Header"];
  [printUtils print:self.webView fromRect:self.myButton.frame inView:self.menuView];
  </code></pre>
  
  <p>My method:</p>
  
  <pre class="lang-c prettyprint-override"><code>- (void)print:(UIWebView *)webView fromRect:(CGRect)rect inView:(UIView *)view
  {
  
      printController = [UIPrintInteractionController sharedPrintController];
      [printController setDelegate:self];
  
  
      if(!printController){
  
          NSError* error = [[NSError alloc] initWithDomain:@"Print unavailable!" code:0 userInfo:nil];
  
          [self showError:error];
          return;
      }
  
      UIPrintInteractionCompletionHandler completionHandler = 
      ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
          if(!completed &amp;&amp; error){
              [self showError:error];
          }
      };
  
      UIPrintInfo* printInfo = [UIPrintInfo printInfo];
      [printInfo setJobName:header];
      [printInfo setDuplex:UIPrintInfoDuplexLongEdge];
      [printInfo setOutputType:UIPrintInfoOutputGeneral];
  
      UIPrintFormatter* viewFormatter = [webView viewPrintFormatter];
  
      CustomPrintPageRenderer *pageRenderer = [[CustomPrintPageRenderer alloc] init];    
      [pageRenderer setJobTitle:[printInfo jobName]];
  
      UIFont* font = [UIFont fontWithName:@"Helvetica" size:HEADER_FOOTER_TEXT_HEIGHT]; 
      CGSize titleSize = [pageRenderer.jobTitle sizeWithFont:font];
      pageRenderer.headerHeight = pageRenderer.footerHeight = titleSize.height + HEADER_FOOTER_MARGIN_PADDING;
  
  
      [pageRenderer addPrintFormatter:viewFormatter startingAtPageAtIndex:0];
  
      [printController setPrintPageRenderer:pageRenderer];
      [printController setPrintInfo:printInfo];    
      [printController setPrintFormatter:viewFormatter];
      [printController setShowsPageRange:YES];    
      [printController presentFromRect:rect inView:view animated:YES completionHandler:completionHandler];
  
  }
  </code></pre>
  
  <p>My attempt to fix the problem implementing the UIPrintInteractionControllerDelegate Method:</p>
  
  <pre class="lang-c prettyprint-override"><code>- (void)printInteractionControllerWillPresentPrinterOptions:(UIPrintInteractionController *)printInteractionController
  {
  
      if (visible) {
          [printController dismissAnimated:YES];
      }
  }
  </code></pre>