There are many questions about updating user table cells, but this question is odd. I have a tableView with each cell, which now has custom UILabel and UIImageView .
Currently, there are only 2 cells. The first shows the date. When the table is first loaded, it displays the current date as a row in the first UILabel cells.
When I select the first cell, I present a custom class that handles all date pickers. After the date has been selected, this view opens, and I return to the table view.
In -(void)viewDidAppear table data is scanned and the new selected date will be displayed.
However, the label in the first cell is not updated.
What confuses the question is that if I have several cells displaying the same data, they will all be updated and display a new date, as expected. It seems that the cell row in index: 0 will not be updated.
What confuses the question even more: when I request the string UILabel value for a cell, it returns the correct date.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
source share