cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"myImage.png"]];
In the above code snippet, you forgot auto-advertisement; also did you set the table delegate? Set a breakpoint in the method tableview:didselectRowAtIndexpathto check if it is called or not.
By the way, your code seems to be correct.
source
share