IOS: store an array with NSUserDefault

前端 未结 6 889
南旧
南旧 2021-02-06 05:58

I want to store an array with NSUserDefault, then, I put in applicationDidEnterBackground

[[NSUserDefaults standardUserDefaults] setObj         


        
6条回答
  •  囚心锁ツ
    2021-02-06 06:43

    and don't forget to use the encodeWithCoder and initWithCoder inside the object that you are trying to save and that is contained in the array

提交回复
热议问题