Skip to content

Instantly share code, notes, and snippets.

@steipete
Last active September 26, 2015 15:17
Show Gist options
  • Save steipete/1117224 to your computer and use it in GitHub Desktop.
Save steipete/1117224 to your computer and use it in GitHub Desktop.
Integrating PSPDFKit
#import <PSPDFKit/PSPDFKit.h>
// Create the PSPDFDocument. (container for one or multiple pdfs)
NSURL *documentURL = [NSBundle.mainBundle.resourceURL URLByAppendingPathComponent:@"Sample.pdf"];
PSPDFDocument *document = [PSPDFDocument documentWithURL:documentURL];
// Open view controller. Embed into an UINavigationController to enable the toolbar.
PSPDFViewController *pdfController = [[PSPDFViewController alloc] initWithDocument:document];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pdfController];
[self presentViewController:navController animated:YES completion:NULL];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment