How to save data from different view controllers and load it in another view controllers in iOS

前端 未结 4 1221
难免孤独
难免孤独 2021-01-28 21:04

I\'m new to iOS. After going through a lot of and documents i\'m confused .This is what I have to do.

I have several view controllers each has NSString values which I\'l

4条回答
  •  温柔的废话
    2021-01-28 21:41

    You can save the data in multiple ways

    1. Use CoreData to save the data. You will find some good tuts on how to use CoreData
    2. Use an SQLite database without CoreData
    3. Save data into your app delegate or a view controller accessible from the final view controller
    4. Pass the data from all viewcontrollers to the final viewcontroller
    5. Save data in a plist

    The possibilities are endless. What works best for your project is what you should use.

提交回复
热议问题