[英]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.