I have a medical app for the iPhone that I'm working on, where a user creates timestamped entries for a series of tests performed, which are stored in sqlite for retrieval and subsequent drilldown. In my model class, I have a property uses an NSArray that is populated with these entries, which gets updated as new additions are made in the app.
One thing I'd like to do is display UI behavior similiar to what the Calendar list view does - for any given day, display a section header, that show the name of the day and the date, ans display the entries made for that day.
From a brute force standpoint, I can see how you could precalculate this - as build your list of entries, you could store the entire list in a dictionary, keyed by date.
This seems pretty inelegant though, so I'm wondering if there are other more efficient ways to accomplish this task.