I’m seeing a related problem and have filed FB25449998 with a small sample project.
On macOS 15.8.2, after calling PDFPage.addAnnotation(_:) on a visible page, the annotation doesn’t reliably appear in PDFView until the page scrolls off screen and back (the page needs to scroll way off for it to work). The annotation is present in page.annotations. The same action in my app shows the annotation right away on iPadOS.
None of these refresh it reliably: annotationsChanged(on:), layoutDocumentView(), needsDisplay on the view or its documentView, a small zoom change, or removing and reinserting the page.
The only reliable workaround I’ve found is setting pdfView.document = nil, setting the document back and restoring the position, or creating a new PDFView. Both cause a visible flash.
Topic:
Graphics & Games
SubTopic:
General
Tags: