This code is run from within a subclass of UITableViewCell
CALayer* greenLayer = [CALayer layer];
greenLayer.backgroundColor = [UIColor greenColor].CGColor;
CGRect frame = CGRectMake(0, 0, 320, self.bounds.size.height);
greenLayer.frame = frame;
[self.backgroundView.layer addSublayer:greenLayer];
But nothing happens
It was another piece of code which caused the problem. I was retrieving the cell incorrectly.