Ahh … I finally figured out how tables, table view controllers, table view delegates, table view data sources, and table view cells all work together. Well, figured it out enough to implement a simple history list as seen on the right.
One of the neat things about tables on the iPhone is that the default style is to have moving section headers. When you scroll the table, the heading for the current section is always visible. For example, in the screenshot, I’ve scrolled down a bit and you can see “5+8+2+8 = 23” is partially obscured. That’s because there are more rolls above. But the section heading “4d8” remains on top so you can always tell where the rolls came from.
Okay, now I’ve got to implement colored dice. That one’s going to be tricky. As I’ve mentioned before, it’s a balance between simplicity and flexibility. It’d be easy to have a control just changed all the dice colors at once. But most people want the ability to mix dice colors. I can do that, but it’s tricky to come up with an elegant way to specify that in the interface. I’ve got some ideas, though…