QLPreviewController显示在屏幕外

时间:2018-01-30 14:26:54

标签: ios objective-c qlpreviewcontroller

Bug屏幕截图链接:

enter image description here

我使用QLPreviewController,但它显示在屏幕外。我不知道为什么?需要帮助,thx!

self.previewingFileInfo = fileInfo;

QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;

[self.navigationController pushViewController:previewController animated:YES];

- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController 
*)controller {
    return self.previewingFileInfo ? 1 : 0;
}

- (id<QLPreviewItem>)previewController:(QLPreviewController *)controller 
previewItemAtIndex:(NSInteger)index {
    return self.previewingFileInfo.URL;
}

//self.previewingFileInfo.URL --->>> file:///Users/liman/Library/Developer/CoreSimulator/Devices/C472DBF9-7DB5-4A09-B443-16F1D40EED52/data/Containers/Data/Application/E7E03D12-FD59-47F6-B2A8-20D75D6B5252/Library/Caches/Logs.zip

0 个答案:

没有答案