【发布时间】:2012-09-08 12:06:41
【问题描述】:
我遇到了一个奇怪的问题。我确信我在代码中的其他地方对文件做了一些事情并且它没有正确关闭或其他什么,但现在它处于报告为已关闭的状态,但是当我调用 OpenWithCompletionHandler 它永远不会返回。见下文:
//if the file is closed, open it and then set up the controller
if (file.documentState == UIDocumentStateClosed){
//---- this code executes
[file openWithCompletionHandler:^(BOOL success){
// ---- this code NEVER executes
}];
}
有什么想法吗?
【问题讨论】:
-
你有没有发现问题出在哪里?升级到 6.0 SDK 后,我无法让 openWithCompletionHandler 在 iOS 5.1 中工作。它永远不会回来。
-
不。我已经有几周没有看到这个问题了,但我现在也在 iOS6 上。
-
我遇到了同样的问题...使用 XCode 4.5.2 (4G2008a),使用 iOS Simulator 6.0 但使用 iOS 5.1 操作系统... openWithCompletionHandler 永远不会在关闭的数据库上触发。我有一个 HUD,它在完成触发时会降低,因此在模拟器中显然很痛苦,因为 HUD 一直在运行。
标签: ios uimanageddocument