I’m using the following code:
func encodeWithCoder( aCoder: NSCoder) {
if let name = name {
aCoder.encode(name, forKey: “name”)
}
aCoder.encode(raise, forKey: “raise”)
}
required init(coder aDecoder: NSCoder) {
name = aDecoder.decodeObject(forKey: "name") as! String?
raise = aDecoder.decodeFloat(forKey: "raise")
super.init()
}
override init() {
super.init()
}
and xcode tells me that "type “Emplyee” does not conform to protocol NSCoding"
I sduspect this is a 2.0 ->3.0 problem. HELP!!
marc