アプリケーションに 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 で動作するターゲットとしてデモを実行しました。