I tried the following code, but the cell doesn’t change at all:
- (void)viewDidLoad
{
[super viewDidLoad];
//Set background image of cells
UITableViewCell *cell;
cell = [CalculatorTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Spots.png"]];
}
Two things. First of all, cells should be created in the cellForRowAtIndexPath method. Secondly, you should make your background view and then add it to the cell content view.