Reputation: 491
I am successfully highlighting text in my PDF view using the answer in this question.
However, whenever I close and reopen the PDF file, the highlight annotations are nowhere to be seen (invisible).
How do I save and/or display the highlights?
Thanks in advance for helping a noob!
Upvotes: 1
Views: 1048
Reputation: 7641
Check out the write operations on PDFKit: func write(toFile path: String) -> Bool
If you're using PSPDFKit, saving happens automatically based on certain trigger criteria (like moving an app into the background) but you can manually trigger it via calling public func save(options: [SaveOption] = []) throws
on PSPDFDocument
.
Upvotes: 1