[英]iOS Swift PDFKit Widget Subtype button border
回答
解决此问题的方法是创建自己的PDFAnnotation子类。
var isChecked = false
init(forBounds bounds: CGRect, withProperties properties: [AnyHashable : Any]?)
override func draw(with box: PDFDisplayBox, in context: CGContext)
我在draw函数中使用了isChecked属性。 如果启用了该属性,那么将显示在Icons8上找到的对勾图像。 我还必须在ViewController中添加PDFAnnotationHitObserver,并处理了isChecked属性的更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.