Reputation: 331
I have a table with static cells. I also have a button that sets the textLabel.text property for each of the cells.
When i press that button, nothing happens visually, even though the labels were really changed.
And here's the weird thing: If i tap on the cell, the value suddenly shows. So i have to tap on each cell to reveal the label text. Now I can tap on the button again (which changes the labels), and it will work fine - I only need to tap the cells the first time, and then they stay "activated".
Upvotes: 0
Views: 507
Reputation: 18363
Try calling [cell setNeedsLayout]
after you change the text. The cell will size its label to CGSizeZero
in layoutSubviews
if its textLabel
's text
is nil
.
Upvotes: 3