Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Broken Pagination 6 years 8 months ago #12711

  • yev
  • yev's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
When Adding any. UI related code in
`- (void)OnPageChanged :(int)pageno`
Pagination of the document become broken;

For instance I having UILabel with page number/total page
- (void)OnPageChanged :(int)pageno {
NSString *pageIndicator = [NSString stringWithFormat:@" %d - %lu ", pageno, (unsigned long)self.totalNumberOfPages];
self.pageIndicatorLabel.text = pageIndicator;
[self.pageIndicatorLabel sizeToFit];
}

pageIndicatorLabel is not a subview of PDFView.
If I commented out the code
self.pageIndicatorLabel.text = pageIndicator;
[self.pageIndicatorLabel sizeToFit];
everything is fine.

Please Log in or Create an account to join the conversation.

Broken Pagination 6 years 8 months ago #12716

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

you can take a look at pageNumLabel label in RDPDFViewController of demo project, it does exactly the same thing.
You said "pageIndicatorLabel is not a subview of PDFView", in which class are you adding your UI elements? I suggest to do it in RDPDFViewController as it is the controller.
What do you mean exactly with "Pagination of the document become broken"?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum