I want to customize UITableViewCell by adding UILabel and two UIButton as its subview. The cell style will be UITableViewCellStyleSubtitle and these three items would have to next (on the left) of detailTextLabel.But when i do this, detailTextLabel overlaps with these items and display clipped or partial subviews. Any way to handle out this without subclassing UITableViewCell if possible. Thanks.
Asked
Active
Viewed 432 times
0
-
try this link for the answer: http://stackoverflow.com/questions/4834199/in-uitableview-cell-detailtextlabel-text-isnt-working-why – Apr 13 '11 at 05:57
1 Answers
0
do you want to display something with detailTextLabel? If not you could try to hide it.
cell.detailTextLabel.hidden = YES;
otherwise you could add another Label at a better position which displays your detailText

Matthias Bauch
- 89,811
- 20
- 225
- 247
-
yes this is why i am using CellStyle as subtitle, and detailtextlabel is only 1/5 width of the cell where remaining will be occupied by UIButtons and UILable. – Oct 06 '10 at 07:56
-
so add another label that replaces the detaillabel and size it so it doesn't get in conflict with your other views. I don't know of any way to change the position of the detailTextLabel. – Matthias Bauch Oct 06 '10 at 08:04