History Implemented
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…
September 5th, 2008 at 12:18 am
congratulations on figuring out the history table.
As far as colors go I was thinking tap and hold could bring up a menu for coloring that dice/ alternatively a double tap…
September 5th, 2008 at 6:10 am
Hm, yeah but how would that work with 30d6 ? I’d hate to have to tap and hold or double tap each one.
September 5th, 2008 at 6:31 am
I would like to have an option that just picks random colors for each die, I don’t particularly care what colors they are, just that they’re distinct. (And I’ll be happy to beta-test partial color blindness…I have troubles with purple vs red vs blue, although even green vs. yellow can be challenging, like with Puzzloop, although I can get by if I try hard…)