Hello,
I m trying to find how i could change cell's image with didselect method.
here is my code.
- (UITableViewCell *)tableView

UITableView *)tableView cellForRowAtIndexPath

NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"Cell";
cell =((MainCellnew *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]);
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"MainCellnew" owner:self options:nil];
}
[cell changeimage:[UIImage imageNamed:@"image_1.png"] ];
return cell;
}
all my cells now have image_1.png and everything is ok.
- (void)tableView

UITableView *)tableView didSelectRowAtIndexPath

NSIndexPath *)indexPath {
HERE I WANT TO CHANGE THE IMAGE OF SELECTED IndeXPath.row
[cell changeimage:[UIImage imageNamed:@"image_2.png"]];
next *controller = [[next alloc] initWithNibName:@"next" bundle:nil];
[self.navigationController pushViewController:controller animated:YES];
}
Than you for any help.