2

我正在模态地展示一个 QLPreviewController。一切正常——它会弹出,显示预览项目和一切。但是,一旦点击共享按钮,应用程序就会在设备和模拟器中崩溃,并出现以下情况:

2013-05-03 20:10:53.563 appname[16860:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle <{{app_path}}> (loaded)' with name '_UIDocumentActivityViewController''

以下是相关代码:

#pragma mark HVSchedulesDelegate

- (void)schedulePDFReceived {
    QLPreviewController *previewController = [[QLPreviewController alloc] init];
    [previewController setDataSource:self];

    [self presentViewController:previewController animated:YES completion:nil];
}

#pragma mark QLPreviewControllerDataSource

- (NSInteger) numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller {
    return 1;
}

- (id <QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index {
    return [NSURL fileURLWithPath:self.schedulesProxy.pdfPath];
}
4

0 回答 0