I have added the vfr Reader framework into my application, I can view pdfs, but when I want to email a pdf or cancel the email, the modal view will not dismiss. I am using iOS 6 & xcode 4.5. Here is my code so far:
#pragma mark - Reader method
- (IBAction)didViewPdf {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *myPath = [paths objectAtIndex:0];
myPath = [myPath stringByAppendingPathComponent:@"karahipi.pdf"];
ReaderDocument *document = [ReaderDocument withDocumentFilePath:myPath password:nil];
if (document != nil) {
readerViewController = [[ReaderViewController alloc] initWithReaderDocument:document];
readerViewController.delegate = self;
readerViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]];
readerViewController.navigationController.navigationBar.tintColor = [UIColor blackColor];
readerViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
readerViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:readerViewController animated:YES completion:nil];
}
}
#pragma mark - Reader delegate metho
- (void)dismissReaderViewController:(ReaderViewController *)viewController {
[self dismissModalViewControllerAnimated:YES];
}
I have run the demo in iOS 6 as target it works there.