
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.59 KB | hits: 36 | expires: Never
#include "PSPDFKit.h" // when using PSPDFKit-lib.xcodeproj (source code) -- or --
#include <PSPDFKit/PSPDFKit.h> // PSPDFKit.framework (binary)
// create the PSPDFDocument (container for one or multiple pdfs)
NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Sample.pdf"];
PSPDFDocument *document = [PSPDFDocument PDFDocumentWithUrl:[NSURL fileURLWithPath:path]];
// open view controller
PSPDFViewController *pdfController = [[[PSPDFViewController alloc] initWithDocument:document] autorelease];
[self presentModalViewController:pdfController animated:YES];