Post

Replies

Boosts

Views

Activity

Custom PDFPage is „skipped“ on a specific page after the first rendering
I have a custom page renderer, aka a subclass of PDFPage, which has a custom draw method. class KilibeePDFPage:PDFPage {     override func draw(with box: PDFDisplayBox, to context: CGContext) { super.draw(with: box, to: context) //Some Additional drawing } } My PDFDocumentDelegate returns this class, and is set up correctly public func classForPage() -> AnyClass { return KilibeePDFPage.self } In general, this works just fine (in several hundreds of PDF documents, many of them with a few hundred pages and up to 400 MB of size). Now, I encountered one specific document (rather normal… 48 MB, 158 pages), which – for the lack of a better word – „looses“ my custom KilibeePDFPage on a specific page (33) after the first couple of PDF tiles, at latest after the first redraw. I have set a logging breakpoint and confirmed that my custom draw method is used for the very first drawing, but is not entered at all as soon as I redraw this specific page, i.e. by zooming in. It looks like the PDFView suddenly draws using the original PDFPage, not the one that it should use according to the Delegate. As soon as I change the page to another one, everything works fine. It looks that there is something on that specific page, which seems to interfere with page rendering, and leads to some kind of fallback. Does that ring a bell? I'm really lost by now, and have no ideas what I could do to address the issue. Any ideas are greatly appreciated!
0
0
462
Jan ’21
Strange UITextEffectsWindow eats away most of my events
I have an app that generally works fine, but I got field reports that some parts of the app becoming unresponsive at times. After endless searching I was finally able to reproduce the situation, and found the following quite strange view hierarchy: UIWindowScene - (Foreground Active) UIWindow UITextEffectsWindow     UIInputWindowController         UIInputSetContainerView               UIInputSetHostView               UIEditingOverlayViewController                      UIEditingOverlayGestureView Some internet search revealed that these are private classes probably linked to undo functionality introduced in iOS13. What is happening here, and how to prevent that? Thanks for any insight! Klaus
3
1
1.6k
Oct ’20