0

我已将 vfr Reader 框架添加到我的应用程序中,我可以查看 pdf,但是当我想通过电子邮件发送 pdf 或取消电子邮件时,模态视图不会关闭。我正在使用 iOS 6 和 xcode 4.5。到目前为止,这是我的代码:

#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];
}

我已经在 iOS 6 中运行了该演示作为它在那里工作的目标。

4

0 回答 0