In an iPhone tableview I have a need to display the number of rows in a child tableview. In some apple iphone apps there is a numbered disclosure indicator (grey lozenge, with white number) which would be perfect.
I was considering whether to draw this with a label & background png, but since the number could be 1, 11 or even 111, the size of the background could change making centering the text very fiddly.
Would it be possible to add a 'numbered disclosure indicator' alongside 'hasDetail' and 'hasChild' for a tableViewRow, with ablity to set integer value - like badge for tabs, would be ideal.
Check out this thread for an example using a custom view.
If you add a label with
width:autoon both objects there shouldn't be any fiddly size problems.
Hope that helps.
Great one. I didn't spot that the label had a borderRadius property.
I'd only thought about using a tiny view but guessed that might be a performance if there were quite a few rows.