Solved example from Big Nerd Ranch's iOS Programming book.