|
@@ -55,12 +55,12 @@ import Cocoa
|
|
|
if let decodedPaths = decoder.decodeObject(forKey: kPathKey) as? [NSBezierPath],
|
|
|
let decodedColor = decoder.decodeObject(forKey: kColorKey) as? NSColor,
|
|
|
let decodedImage = decoder.decodeObject(forKey: kImageKey) as? NSImage,
|
|
|
- let decodedType = decoder.decodeObject(forKey: kTypeKey) as? Int {
|
|
|
+ let decodedType = decoder.decodeObject(forKey: kTypeKey) as? NSNumber {
|
|
|
|
|
|
paths = decodedPaths
|
|
|
signatureColor = decodedColor
|
|
|
pathsImage = decodedImage
|
|
|
- signatureType = KMPDFSignatureType.init(rawValue: decodedType) ?? .text
|
|
|
+ signatureType = KMPDFSignatureType.init(rawValue: decodedType.intValue) ?? .text
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -68,6 +68,6 @@ import Cocoa
|
|
|
encoder.encode(paths, forKey: kPathKey)
|
|
|
encoder.encode(signatureColor, forKey: kColorKey)
|
|
|
encoder.encode(pathsImage, forKey: kImageKey)
|
|
|
- encoder.encode(signatureType.rawValue, forKey: kTypeKey)
|
|
|
+ encoder.encode(NSNumber(integerLiteral: signatureType.rawValue), forKey: kTypeKey)
|
|
|
}
|
|
|
}
|