PDF file is hiding under Navigation Controller

Good day

I’m developing an iOS Pdf app using pdftron framework.

My problem is: When displaying a pdf in a viewController is hiding about a height of a navigationController (44 pixels) under the navigationController, and it animates after like a second a pdf file is displayed, even if you try and scroll down the pdf file, it animates the same…hide under the navigationController.

My code for the frame for displaying the pdf:

PTPDFViewCtrl *_pdfViewCtrl = [[PTPDFViewCtrl alloc] initWithFrame:[self.view bounds]];

I also tried this

_pdfViewCtrl = [[PTPDFViewCtrl alloc] initWithFrame:CGRectMake(0, 50, self.view.frame.size.width, self.view.frame.size.height)];

Thank you.

Hi Sipho,

I did a quick Google search, and found the following question/answer on Stack Overflow that appears to answer your question: http://stackoverflow.com/questions/18924431/ios-7-navigationcontroller-is-setting-the-contentinset-and-contentoffset-of-m

Please let me know if it helps.

Thank you, actually you gave me a clue. I unchecked the “Under Top Bars” check box on the side bar and it worked. Thank you.