title: cant dismiss MFMailComposeViewController shown by clicking mail link in UITextVIew (iOS 8 beta bug)
body: <p><strong>This turned out to be due to bug in iOS 8 beta. I have reported it via bug number 17318153</strong></p>
  
  <p>I'm setting an email address to a UITextField. The intent is for iOS to see its an email address and, if the user taps it, display an instance of <code>MFMailComposeViewController</code> to send an email (which it does).</p>
  
  <p>However, if the user then taps cancel, the <code>MFMailComposeViewController</code> is not being dismissed. I tried setting my viewController as a <code>MFMailComposeViewControllerDelegate</code> and overriding <code>mailComposeController: didFinishWithResult: error:</code> but it's not being called. Seemingly, the delegate for the MFMailComposeViewController that is displayed when the url is tapped is not set to self.</p>
  
  <p>How can I make the cancel button in the <code>MFMailComposeViewController</code> actually dismiss the view controller that is displayed?</p>
  
  <p>My .h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;MessageUI/MessageUI.h&gt;
  
  @interface AboutUsViewController : UIViewController&lt;MFMailComposeViewControllerDelegate&gt;{
  
      IBOutlet UIImageView *imageView;
      IBOutlet UITextView *companyName;
      IBOutlet UITextView *phoneNumber;
      IBOutlet UITextView *emailAddress;
      IBOutlet UITextView *aboutUsField;
  
  }
  @end
  </code></pre>
  
  <p>In .m: </p>
  
  <pre><code>- (void)viewDidLoad {
          [super viewDidLoad];
          // Do any additional setup after loading the view.
          emailAddress.text=@"support@email.com";
  }
  
  
  
  - (void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
  {
      switch (result)
      {
          case MFMailComposeResultCancelled:
              NSLog(@"Mail cancelled");
              break;
          case MFMailComposeResultSaved:
              NSLog(@"Mail saved");
              break;
          case MFMailComposeResultSent:
              NSLog(@"Mail sent");
              break;
          case MFMailComposeResultFailed:
              NSLog(@"Mail sent failure: %@", [error localizedDescription]);
              break;
          default:
              break;
      }
  
      // Close the Mail Interface
      [self dismissViewControllerAnimated:YES completion:NULL];
  }
  </code></pre>