I have a custom UITableViewCell
named as Hobbies
.
Everything is working fine.Except one UIIssue.
When user taps on any cell
I want to change the text colour of that particular Cell
.And when user select another I want the previous selected cell
should return to its original state.
Currently I am able to change the colour on Cell
select but not able to revert it back when user selects another.
Here is the code I am using to change the textColor
of a particular cell:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
HobbiesCell *cell = (HobbiesCell*)[tableView cellForRowAtIndexPath:indexPath];
cell.dateLabel.textColor = [UIColor colorWithWhite:255 alpha:0.5f];
}
How can I revert It back when user selects another cell.