无法关闭在iOS 8中从UIDocumentInteractionController调用的电子邮件工作表 [英] Cannot dismiss email sheet invoked from UIDocumentInteractionController in iOS 8

查看:412
本文介绍了无法关闭在iOS 8中从UIDocumentInteractionController调用的电子邮件工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的测试应用程序,只包含以下代码,附加到 UIButton

I've got a very simple test app which contains nothing but the following code, attached to a UIButton:

- (IBAction)buttonUp:(id)sender {

  // Build file path
  NSString* filePath = [[NSBundle mainBundle] pathForResource:@"testfile"
                                                       ofType:@"txt"];

  NSURL *url = [NSURL fileURLWithPath:filePath];

  m_interactionController = [UIDocumentInteractionController interactionControllerWithURL:url];

  [m_interactionController presentOptionsMenuFromRect:CGRectMake(200, 200, 100, 100)
                                               inView:[self view]
                                             animated:YES];
}

这是构建没有问题,并运行在iOS 7

This builds with no issues, and running under iOS 7 (on a 4th generation iPad: A1458), this code works fine.

问题是,在iOS 8 Beta 5中,如果用户从 UIDocumentInteractionController ,则显示的电子邮件表格永远无法关闭。点击发送确实发送邮件,但电子邮件表继续显示。点击取消并选择删除或保存草稿没有任何效果。

The problem is that, in iOS 8 Beta 5, if the user selects "Mail" from the UIDocumentInteractionController, then the email sheet that is displayed can never be dismissed. Tapping Send does indeed send the mail, but the email sheet continues to be displayed. Tapping on Cancel and electing to either delete or save the draft has no effect.

使用Xcode 5.1.1构建测试应用程序时出现问题。但是,如果应用程序是用Xcode 6 GM构建的,那么问题不会发生,代码可以正常工作。

The problem occurs when the test app is built using Xcode 5.1.1. However, if the app is built with the Xcode 6 GM, then problem does not occur, and the code works fine.

上面的代码有什么问题吗? / p>

Is there anything wrong with the code above?

推荐答案

对于我们来说,问题没有发生在iOS 8的最终发布版本。

For us, the problem did not occur in the final released version of iOS 8.

我已经把它发布到Radar,它被关闭作为一个副本(重复的状态是打开),所以大概是一个bug在iOS 8的预发布版本。

I had posted it to Radar, and it was closed as a duplicate (with the status of the duplicate being "Open"), so presumably it was a bug in the prerelease versions of iOS 8.

这篇关于无法关闭在iOS 8中从UIDocumentInteractionController调用的电子邮件工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆