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.
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"?