Feature request: numbered disclosure indicator
Hi there,
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.
cheers,
Chris.
2 Answers
-
Accepted Answer
Hi Chris
Check out this thread for an example using a custom view.
If you add a label with
textAlign:'center'
and specifywidth:auto
on both objects there shouldn't be any fiddly size problems.Hope that helps.
-
Hi James,
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.
Many thanks,
Chris.