Skip to content

Instantly share code, notes, and snippets.

@jungchris jungchris/SeatModel.swift
Last active Apr 15, 2016

Embed
What would you like to do?
Encode with Coder
func initWithCoder(aDecoder:NSCoder ) -> instancetype {
self = super.init()
self.seatUUID = aDecoder.decodeObjectForKey("seatUUID")
self.seatManuID1 = aDecoder.decodeObjectForKey("seatManuID1")
self.seatManuID2 = aDecoder.decodeObjectForKey("seatManuID2")
self.seatDataStructure = aDecoder.decodeObjectForKey("seatDataStructure")
self.seatBabyPresent = aDecoder.decodeObjectForKey("seatBabyPresent")
self.seatBatteryLevel = aDecoder.decodeObjectForKey("seatBatteryLevel")
self.seatSignalStrength = aDecoder.decodeObjectForKey("seatSignalStrength")
self.seatLastSignal = aDecoder.decodeObjectForKey("seatLastSignal")
self.seatName = aDecoder.decodeObjectForKey("seatName")
self.seatStatus = aDecoder.decodeObjectForKey("seatStatus")
return self
}
func encodeWithCoder(aCoder:NSCoder ){
aCoder.encodeObject(self.seatUUID,forKey:"seatUUID")
aCoder.encodeObject(self.seatManuID1,forKey:"seatManuID1")
aCoder.encodeObject(self.seatManuID2,forKey:"seatManuID2")
aCoder.encodeObject(self.seatDataStructure,forKey:"seatDataStructure")
aCoder.encodeObject(self.seatBabyPresent,forKey:"seatBabyPresent")
aCoder.encodeObject(self.seatBatteryLevel,forKey:"seatBatteryLevel")
aCoder.encodeObject(self.seatSignalStrength,forKey:"seatSignalStrength")
aCoder.encodeObject(self.seatLastSignal,forKey:"seatLastSignal")
aCoder.encodeObject(self.seatName,forKey:"seatName")
aCoder.encodeObject(self.seatStatus,forKey:"seatStatus")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.