Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between core data & NSUserDefaults-notes app

Creating a budget app (not for release, just something quick & dirty) and I noticed upon starting the Master-Detail template that Apple uses Core Data and NSFetch results to populate the tables (think Notes on an iPad).

My inexperienced and unprofessional programming instincts wouldn't think twice about grabbing an NSMutableArray, taking the names of the table cells and cramming them into an index, saving that as an NSUserDefault and then upon reloading the app, populate each cell at it's current index with the same index in the NSMutableArray so the contents is back where the user left it. Just wondering, how inefficient is this compared to using Core Data?

On a side note, any easy way of communicating between two different tables that both hold dynamic data?

like image 898
blindman457 Avatar asked Dec 30 '25 16:12

blindman457


1 Answers

Up to a few hundred records, don't worry about it. It would be indeed wonderfully "quick and dirty".

Still, the learning curve for Core Data is not as steep as you might expect. Once you get the hang of it - and your simple app is great way to explore that API - you will find that you want to do everything with it. Even large projects will seem easy.

Your choice.

like image 66
Mundi Avatar answered Jan 02 '26 07:01

Mundi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!