使用PSPDFKIT,如何重写PSPDFDrawView类以添加触摸事件功能?

时间:2019-04-25 12:27:32

标签: ios swift

categories: {
    0: {category_name: "World Cuisine"},
    1: {category_name: "Diet of Course"},
    2: {category_name: "Meal Type"}
},
important_select: "2",
test2: ""

这是我的 PSPDFSignatureViewController 类:

import Foundation
import UIKit
import PSPDFKit
import PSPDFKitUI

class SignatureDrawView: PSPDFDrawView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        isMultipleTouchEnabled = true
        strokeColor = .red
        inputMode = .draw
        backgroundColor = .black

    }

    required init?(coder aDecoder: NSCoder) {
       super.init(coder: aDecoder)!
         isMultipleTouchEnabled = true
        strokeColor = .red
        inputMode = .draw
        backgroundColor = .black


    }

    override func startDrawing(at location: PSPDFDrawingPoint) {

    }
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

    }
}

我正在尝试用PDF文件中的墨水构建带有数字签名的应用程序。

0 个答案:

没有答案