Core Data or .Plist?
I would like to create an application that stores 3 informations:
- the patient's name (string)
- the test result (int) and
- the date of testing.
In the first UIView, a TableView will show up with a list of patients. By clicking on any cell in the UIView, the list of tests with dates that the patient performed is shown. I'm just starting on Objective-C and have not found the best way to do this. Using Core Data and SQLite? Using a .Plist file? And for arrays? I will create 3 arrays?
My first idea was to create an NSMutableArray of patients and each associate a test, but in this case for a patient to carry out various tests, his name will shown repeated in the list of patients. I couldt find thought how could filter theNSMutableArray` (with predicate?) To display the test data for a single patient in the next screen. Any ideas?
Your question is a bit too generic to answer it properly.
But if you save patient information you should definitely consider encrypting the data. CoreData sounds a bit overkill if you save a very limited amount of data and you don't want to worry about data management, schemas and migrations.
A PLIST storage sounds like a perfectly reasonable solution. Regarding your data structure.
You have an array of patients in your first view. When you select a cell to get to the next view, you'll pass the selected patient to the next view.