Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

Broken Pagination

More
IP: 192.168.0.71 8 years 7 months ago #12711 by yev
Broken Pagination was created by yev
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.
More
IP: 192.168.0.71 8 years 7 months ago #12716 by emanuele
Replied by emanuele on topic Broken Pagination
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"?
Time to create page: 0.378 seconds
Powered by Kunena Forum