Since iOS 16, Apple's PDFView adds a Highlight editing action in the text selection menu, which apparently does nothing.
Unfortunately I could not find a way to disable it, after trying:
Overriding canPerformAction() to return false.
I did it in PDFDocumentView but also used method swizzling to do it in all the subviews of PDFView, every time layoutSubviews() is called.
Overriding buildMenu(), but couldn't find a menu item identifier matching Highlight, I tried all of them.
Since iOS 16, Apple's
PDFView
adds a Highlight editing action in the text selection menu, which apparently does nothing. Unfortunately I could not find a way to disable it, after trying:canPerformAction()
to return false.PDFDocumentView
but also used method swizzling to do it in all the subviews ofPDFView
, every timelayoutSubviews()
is called.buildMenu()
, but couldn't find a menu item identifier matching Highlight, I tried all of them.Other people are having the same issue: https://developer.apple.com/forums/thread/725339