Solved example from Big Nerd Ranch's iOS Programming book. This example uses Core Data.