I have a start date/end date feature in my iPhone application. It is similar to that in the iPhone's native Calendar application, except there's no "All-day" option. That is, all the user can do is enter a start time/date and an end time/date.
The interface is a simple grouped UITableView with two cells. The user selects either the Start cell or the End cell (turning it blue), and then uses a UIDatePicker to change the values for each.
I've got everything working as expected, except that the user can click outside the table, which causes none of the table cells to be selected. The problem is, the user is still editing the previously-selected cell.
Ideally I would be able to restrict the user to always have one of the table cells selected. Barring that, I would settle for being able to detect that no cells have been selected, so I can intercept the UIDatePicker before it edits anything.