小编Kap*_*man的帖子

点击QLPreviewController ios 4.2中的菜单操作按钮,iPhone-应用程序崩溃

 When I try to click the menu action button in QLPreviewController the application crashes.
Run Code Online (Sandbox Code Playgroud)

这就是我在委托方法中所做的

- (id)previewController:(QLPreviewController *)previewController previewItemAtIndex:(NSInteger)index
{

    NSMutableString*Url = [[NSMutableString alloc] initWithFormat:@"http://10.30.24.21/Documents/abc.doc];

    NSURL *fileURL;
    fileURL = [NSURL URLWithString:Url];// the url of the file which is present in NAS device
    [Url release];
    return fileURL;
}
Run Code Online (Sandbox Code Playgroud)

这是崩溃报告

2011-01-11 12:21:36.717 iLink[5548:207] *** Assertion failure in -[UIDocumentInteractionController setURL:], /SourceCache/UIKit_Sim/UIKit-1447.6.4/UIDocumentInteractionController.m:1060
2011-01-11 12:21:36.720 iLink[5548:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIDocumentInteractionController: invalid scheme https.  Only the file scheme is supported.' …
Run Code Online (Sandbox Code Playgroud)

iphone

11
推荐指数
3
解决办法
1万
查看次数

标签 统计

iphone ×1