How to save custom objects in array and store it in NSUserDefaults - iPhone

前端 未结 3 672
星月不相逢
星月不相逢 2020-12-10 09:32

I am getting my custom class object after button action method. Now I need to store multiple custom objects in NSMutableArray and then store this array in

3条回答
  •  暖寄归人
    2020-12-10 10:05

    This two methods will mainly used to store and retrieve custom object's property.

    - (void)encodeWithCoder:(NSCoder *)encoder ;
    - (id)initWithCoder:(NSCoder *)decoder;
    

    Take look at @chrissr's answer, @Brad Larson's answer

提交回复
热议问题