I am trying PSDFKit demo version to display pdf files in my application. I have added PSPDFViewcontroller as child view to app view hierarchy.And PSPDKIt toolbars are hidden.App is using toolbars of parent view controller.
My problem is that when I tried to add note annotation then it gets overlapped with bottom toolbar. Could not find reason behind this strange behaviour.
What could be reason? Here is my code
-(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];
}
}