save and load data (iphone sdk)

后端 未结 4 1981
深忆病人
深忆病人 2021-01-28 14:51

i\'m wondering what\'s the best method to save and load data in a iphone application.

i\'m trying to save strings into a text file or something like that and load them

4条回答
  •  粉色の甜心
    2021-01-28 15:54

    There are basically three methods for saving data:

    • Use File Manager to save the file to the file system. (But in your case, you should not do that) It's useful for large images files only.
    • Use Sqlite to save your data into a relational database.
    • Use Core Data Framework to save all your data.

    In your case, you should definitely learn how to use Core Data, it's hard at the first time, but it is really comfortable later on. There is as well the NSFetchedResultsController to handle the loading into TableView.

    Most of the utility applications use Core Data to save data (Todo lists, etc..). The link to Core Data has been posted by willcodejavaforfood.

提交回复
热议问题