Hi all,
I'm doing something and haven't been able to make it work properly yet. This is what I do: I have a TableViewController managing a table which contains text labels that I'd like to periodically refresh to reflect some new text. Since the text of the label is supposed to change periodically, I'd like the new text showing up in each cell of the table periodically.
To this purpose I start a timer inside the initWithStyle method of the UITableViewController implementation like this:
<code>
timer = [NSTimer scheduledTimerWithTimeInterval

1.0) target:self
selector:@selector(update

userInfo:nil repeats:YES];
</code>
where update is something like this:
<code>
- (void)update

id)sender {
if (cntDeb == 0) cntDeb = 1;
else cntDeb = 0;
for (CellWrapper *element in displayList) {
if (cntDeb == 0)
element.textOfLabel = @"TEST AA";
else
element.textOfLabel = @"TEST BB";
}
}
</code>
I'm expecting to see the table cell label text flipping between TEST AA and TEST BB every second.
However, this doesn't happen and the table just displays the default text (neither TEST AA or TEST BB). The strange thing is that the cell's label flips between TEST AA and TEST BB after I drag the table with my finger up or down the screen. Only in this way I see the labels changing but not if I don't touch the screen.
Any ideas?
Thanks.