When I try to click the menu action button in QLPreviewController the application crashes.
Это то, что я делаю в методе делегата
- (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;
}
Это отчет о сбое
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.'
Когда я попробуйте предварительно просмотреть файл, присутствующий локально, нажатие кнопки действия меню не приводит к сбою.
там я ' 1. Можно ли отключить кнопку действия меню? 2. Есть ли способ избежать сбоя с помощью [NSURL URLWithString: Url]?
Спасибо