我正在使用QuickLook查看PDF文件.
它在iOS 7.1中正常工作,但iOS 8 GM会出现一些问题.
图片比文字好,我想告诉你问题:
iOS 7.1 Xcode 6(工作正常)
使用QuickLook进行转换(没有失败)
页面滚动,navigationBar隐藏得很好
————————————————– ————————
而现在,iOS 8 GM与Xcode 6
使用QuickLook进行转换…
页面滚动,navigationBar不隐藏,页面指示器隐藏在NavigationBar后面
与iPhone模拟器,iPad模拟器,iPhone设备和iPad设备相同的问题.
你可以在这里看到我的源代码:
- (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)previewController { NSInteger numToPreview = 0; if (currentSection == CVSectionConvocations) numToPreview = self.convocation.convocations.count; else if (currentSection == CVSectionAttachments) numToPreview = self.convocation.attachements.count; return numToPreview; } - (id)previewController:(QLPreviewController *)previewController previewItemAtIndex:(NSInteger)idx { PDF *pdf; if (currentSection == CVSectionConvocations) pdf = self.convocation.convocations[idx]; else if (currentSection == CVSectionAttachments) pdf = self.convocation.attachements[idx]; return [pdf path]; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { // determine section currentSection = (indexPath.section == 0 ? CVSectionConvocations : CVSectionAttachments); PDF *pdf; if (currentSection == CVSectionConvocations) pdf = self.convocation.convocations[indexPath.row]; else if (currentSection == CVSectionAttachments) pdf = self.convocation.attachements[indexPath.row]; if ([pdf isstored]) { QLPreviewController *previewController = [[QLPreviewController alloc] init]; previewController.dataSource = self; previewController.delegate = self; previewController.currentPreviewItemIndex = indexPath.row; [[self navigationController] pushViewController:previewController animated:YES]; } else { [self displayMessage:@"Document not found" title:@"Oups !"]; } }
谢谢你的帮助
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。