voidencodeWithCoderNSCoder
Void encodeWithCoder NSCoding method overview
encodeWithCoder: is the Objective-C instance method used to save an object's state into a coder, making the
In Objective-C, the method is declared as - (void)encodeWithCoder:(NSCoder *)coder;. When an object is archived with mechanisms
A typical implementation encodes each relevant property, using appropriate coder methods such as encodeObject:forKey:, encodeInteger:forKey:, encodeBool:forKey:,
The complementary implementation in initWithCoder: retrieves values with decodeObjectForKey:, decodeIntegerForKey:, decodeBoolForKey:, etc., and assigns them to
encodeWithCoder: is used with keyed archivers such as NSKeyedArchiver and NSKeyedUnarchiver, enabling robust persistence of complex