当 UIDocument 关闭时,它可以再次关闭吗?即使重新打开后它的documentState是UIDocumentStateNormal?
请帮我。非常感谢!
[document openWithCompletionHandler:^(BOOL success) {
if (success) {
[document closeWithCompletionHandler:^(BOOL success) {
if (success) {
[document openWithCompletionHandler:^(BOOL success) {
if (success) {
NSLog(@"%d", document.documentState);
//Exception
[document closeWithCompletionHandler:^(BOOL success) {
if (success) {
}
}];
}
}];
}
}];
}
}];
当在“异常”标记处调用 closeWithCompletionHandler 时,会引发异常:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'closeWithCompletionHandler called while document is already closing'