2

I am working with PDFKit on macOS 10.12 and Xcode 8.0. I am creating some annotations in a pdf, displayed using PDFView, but I am not able to see them once created, unless to force the refreshing of the view through zomming in and out inside the page.

I have written a Minimal Working Example that you can clone from here

If you clone it in your root folder the code will run, otherwise remember to change pdfPath to the path of an existing pdf.

Additional details on the problem: Add pdf annotation with PDF Kit in OS 10.12 (it seems that there is a workaround of the problem but I am not been able to implement it, may you are

PDFView setNeedsDisplay:YES doesn't work on MacOS Sierra 10.12 (same problem, they did not solve it)

Displaying pdf files using the PDFKit interface (same workaround suggested in the first link, but I am still not able to use it. The answer continued in a chat and so I cannot see how they managed)

Last but maybe not less important, Xcode gives me this warning (maybe solving it the problem would solve, but I cannot find an exhaustive documentation that teaches how to manage it): here

Thank you in advance for all the precious answers.

Screenshot of the minimal working example that I have linked

Community
  • 1
  • 1
Nisba
  • 3,210
  • 2
  • 27
  • 46

0 Answers0