search

Home  >  Q&A  >  body text

Can plist save model array?

channelList is an array that holds the model.

[_channelList writeToFile:filePath atomically:YES];
    
NSArray *returnArray = [NSArray arrayWithContentsOfFile:filePath];

But I can’t get the value from plist.

PHP中文网PHP中文网2854 days ago472

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:27:20

    Model objects cannot be written to File directly and need to be serialized first before they can be saved

    reply
    0
  • Cancelreply