我遇到了一个奇怪的问题。我确信我对代码中其他地方的文件做了一些操作,并且它没有正确关闭或其他什么,但现在它处于报告为已关闭的状态,但当我调用 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
}];
}
有任何想法吗?
See 使用 UIManagedDocument 的 Xcode 4.5 中的 iPhone Simulator 5.1 中的错误 https://stackoverflow.com/questions/12557442/bug-in-iphone-simulator-5-1-with-xcode-4-5-using-uimanageddocument.
我的解决方案与报告的解决方案相同,但我必须将应用程序的部署目标降低到 iOS 5.0,以便“iPhone 5.0 Simulator”可用作运行目标。我只在尝试将 iPhone 5.1 模拟器与 XCode 4.5.2 一起使用时看到此问题,5.0 和 6.0 模拟器都可以工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)