HI, i am working on a project on which i have to preselect a particular cell. i can per select an cell using willDisplayCell. But i couldn't deselect it while the user click on any other cell.
- (void)tableView: (UITableView*)tableView willDisplayCell: (UITableViewCell*)cell forRowAtIndexPath: (NSIndexPath*)indexPath
{
AppDelegate_iPad *appDelegte = (AppDelegate_iPad *)[[UIApplication sharedApplication] delegate];
if([appDelegte.indexPathDelegate row] == [indexPath row])
{
[cell setSelected:YES];
}
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
AppDelegate_iPad *appDelegte = (AppDelegate_iPad *)[[UIApplication sharedApplication] delegate];
NSIndexPath *indexpath1 = appDelegte.indexPathDelegate;
appDelegte.indexPathDelegate = indexPath;
[materialTable deselectRowAtIndexPath:indexpath1 animated:NO];
}