4

For a PDFDocument that contains annotations with a widgetFieldType of PDFAnnotationWidgetSubtype.text and PDFAnnotationWidgetSubtype.button is it possible to disable user interaction for those annotations (i.e. clicking on a checkbox does not cause it to toggle)?

Kevin Sylvestre
  • 37,288
  • 33
  • 152
  • 232

1 Answers1

3

You can try this (for first page):

        pdfView.document?.page(at: 0)?.annotations.filter {
            $0.widgetFieldType == PDFAnnotationWidgetSubtype.button
            }.forEach {
                $0.shouldDisplay = false
            }
        }
Aris
  • 1,529
  • 9
  • 17