【发布时间】:2020-11-25 12:04:06
【问题描述】:
我对 Objective 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];
有人知道为什么我的 pdfanotation 没有绘制在我的 pdf 上吗? 我还想知道目标 c 是否完全支持 PdfKit 框架,因为苹果的文档中只有使用 swift 制作的示例。
感谢您的帮助!
【问题讨论】: