merocode

Let's reveal the code!

Posts Tagged ‘uitableview’

detailTextLabel Disappear Issue

If you use UITableView with the cell style of Subtitle, you may need detailTextLabel to be empty in some cases.

Unfortunately setting the text of the detailTextLabel to empty string or nil seems to remove detailTextLabel from cell hierarchy. So after setting back the text of the detailTextLabel to some string value, the detailTextLabel will not appear in the cell any more.

You should write the following lines in order for the detailTextLabel to appear with the new text and to be in the desired position.