Load PDF in UIViewcontroller
Hello!
I am creating a simple PDF reader. All of the sample codes that i saw i had to tap a button to open the pdf. But what i really want is to open the pdf file when te app runs, without tapping a button.
This is my viewDidLoad code in ViewController.m:
- (void)viewDidLoad
{
[superviewDidLoad];
NSString *path = [[NSBundlemainBundle] pathForResource:@"399_KIT_ELEITORAL_BX_01"ofType:@"pdf"];
PageViewController *page = [[PageViewControlleralloc] initWithPDFAtPath:path];
[selfpresentViewController:page animated:YEScompletion:NULL];
}
When i run the app, it doesn`t show the pdf.
Thank you!