title: Cancel button does not dismiss ComposeMail window in iOS simulator
body: <p>My implementation is pretty simple:</p>
  
  <p>In the <code>.h</code> file, I'm implementing <code>MFMailComposeViewControllerDelegate</code></p>
  
  <p>And in the <code>.m</code> file, I have the following bit of code:</p>
  
  <pre><code>-(void)MailCurrentViewAsAttachment
  {   
      if ( [MFMailComposeViewController canSendMail] ) {
          MFMailComposeViewController * mailComposer = [[MFMailComposeViewController alloc] init];
          mailComposer.delegate = self;
          [mailComposer addAttachmentData:imageData mimeType:@"image/jpeg" fileName:@"attachment.jpg"];
  
          [self presentViewController:mailComposer animated:YES completion:nil];
      }
  }
  
  -(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
  {
      [self dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>
  
  <p>The variable <code>imageData</code> above is of the UIImage type, and I know for sure there's nothing wrong with it: the required image shows up properly in the compose mail window.</p>
  
  <p>However clicking the Cancel button does not dismiss the Compose window. What am I missing?</p>
  
  <p>Note: I'm using iOS 6 with the latest version of xcode, and my app is a Universal app.</p>