Hi,
you can check if the annotation is readonly with [PDFAnnot isReadonly].
In PDFView class, you can edit the onSingleTap method where it checks if the annotation is an edit text:
NSString *nuri = [m_annot getEditText];
if (nuri) {
if (m_delegate) {
CGRect annotRect;
annotRect.origin.x = m_annot_rect.left / m_scale;
annotRect.origin.y = m_annot_rect.top / m_scale;
annotRect.size.width = (m_annot_rect.right - m_annot_rect.left)/m_scale;
annotRect.size.height = (m_annot_rect.bottom - m_annot_rect.top)/m_scale;
[m_delegate OnAnnotEditBox :annotRect : nuri];
}
return;
}
and add the readonly check:
NSString *nuri = [m_annot getEditText];
if (nuri) {
if (m_delegate && ![m_annot isReadonly]) { // <-- Here is the readonly check
CGRect annotRect;
annotRect.origin.x = m_annot_rect.left / m_scale;
annotRect.origin.y = m_annot_rect.top / m_scale;
annotRect.size.width = (m_annot_rect.right - m_annot_rect.left)/m_scale;
annotRect.size.height = (m_annot_rect.bottom - m_annot_rect.top)/m_scale;
[m_delegate OnAnnotEditBox :annotRect : nuri];
}
return;
}