Fast and Lean PDF Viewer for iPhone / iPad / iOS - tips and hints?

后端 未结 3 789
攒了一身酷
攒了一身酷 2020-11-22 06:47

There has been many Questions recently about drawing PDF\'s.

Yes, you can render PDF\'s very easily with a UIWebView but this cant give the performance

3条回答
  •  感动是毒
    2020-11-22 07:29

    For a simple and effective PDF viewer, when you require only limited functionality, you can now (iOS 4.0+) use the QuickLook framework:

    First, you need to link against QuickLook.framework and #import ;

    Afterwards, in either viewDidLoad or any of the lazy initialization methods:

    QLPreviewController *previewController = [[QLPreviewController alloc] init];
    previewController.dataSource = self;
    previewController.delegate = self;
    previewController.currentPreviewItemIndex = indexPath.row;
    [self presentModalViewController:previewController animated:YES];
    [previewController release];
    

提交回复
热议问题