苹果官方的解释是:A protocol that enables an object to be encoded and decoded for archiving and distribution.
NSCoding是一个协议,主要实现两个方法
- (void)encodeWithCoder:(NSCoder*)aCoder//序列化数据encode
- (instancetype)initWithCoder:(NSCoder*)aDecoder//反序列化数据decode
苹果官方的解释是:A protocol that enables an object to be encoded and decoded for archiving and distribution.
NSCoding是一个协议,主要实现两个方法
- (void)encodeWithCoder:(NSCoder*)aCoder//序列化数据encode
- (instancetype)initWithCoder:(NSCoder*)aDecoder//反序列化数据decode
本文标题:NSCoding协议
本文链接:https://www.haomeiwen.com/subject/zqfahftx.html
网友评论