アプリケーションで PDF ファイルを表示するために PSDFKit デモ版を試しています。PSPDFViewcontroller を子ビューとしてアプリ ビュー階層に追加しました。また、PSPDKIt ツールバーは非表示です。アプリは親ビュー コントローラーのツールバーを使用しています。
私の問題は、メモの注釈を追加しようとすると、下部のツールバーと重なってしまうことです。この奇妙な動作の背後にある理由を見つけることができませんでした。
何が理由でしょうか?これが私のコードです
-(void)showDocumentWithFileURL:(NSURL *)url
{
NSData*pdfdata = [NSData dataWithContentsOfURL:url];
PSPDFDocument *document = [PSPDFDocument documentWithData:pdfdata];
[document.outlineParser outline]; //Parse outline..
self.psPdfViewController = [[PSPDFViewController alloc] initWithDocument:document];
self.psPdfViewController.scrollingEnabled = YES;
self.psPdfViewController.toolbarEnabled = NO;
self.psPdfViewController.delegate = self;
self.psPdfViewController.document.delegate = self;
self.psPdfViewController.shouldHideStatusBarWithHUD = NO;
self.psPdfViewController.renderAnimationEnabled = NO;
self.psPdfViewController.hidesBottomBarWhenPushed =YES;
//Hide bottom page scrollbar.
self.psPdfViewController.scrollDirection = PSPDFScrollDirectionVertical;
self.psPdfViewController.leftBarButtonItems = @[];
//Add pspdf view as chaild view controller.
[self addChildViewController:self.psPdfViewController];
[self.view addSubview:self.psPdfViewController.view];
//Add Navigation Bar and toolbar Buttons.
[self updateHeaderFooter];
}
else
{
[self updateHeaderFooter];
}
}