I have this data that I’d like to save to plist. MONTH and DAY are the system date integers. I know how to get them.
MONTH
DAY
int, string, int
Example:
5
25
10, text, 50
I have a UITableView in which I must import the data on this way:
If the system month is 3, search the plist for the key 3 and populate the table with only days of the month 3.
What is the best approach for this?
EDIT:
The year is not important. In the table, it should be a list of months, and when pressed it should list all the days associated with the particular month. And every day should have all the data associated to particular day.
I am confused on how to structure the data in the plist.
Looks like this thread has some good information on saving your NSDictionary as a plist:
Save NSDictionary to plist
As for displaying your results in the table view, I’m a little confused as to how you are organizing your NSDictionary. In general, you should do something like this:
Then, you create an NSArray pointer to the data set you want to use. So, if you want to display the third section, just do:
This will select all the data you just created associated with the third month. Use this object when providing commands to your table view delegate and data source.