我对目标 c 和 Apple 的 PdfKit 框架还很陌生,我无法在我的 pdf 上绘制注释。
我在控制台上没有错误。这是我的代码:
PDFAnnotation * observation = [[PDFAnnotation alloc] init];
CGRect cgRect = CGRectMake(20, 20, 120, 120);
observation.widgetFieldType = PDFAnnotationWidgetSubtypeButton;
observation.bounds = cgRect;
observation.shouldDisplay = true;
observation.backgroundColor = UIColor.redColor;
observation.widgetFieldType= PDFAnnotationWidgetSubtypeButton;
[page addAnnotation:observation];
有人知道为什么我的 pdfannotation 没有画在我的 pdf 上吗?我还想知道目标 c 是否完全支持 PdfKit 框架,因为苹果的文档中只有使用 swift 制作的示例。
谢谢您的帮助 !