I have a UITableView and would like to apply a background image to all cells. My height for each cell is variable. How should I go about creating the background image?
cell.contentView.backgroundColor = [UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]];
One idea is to place a UIImage with a stretchable image on it. That way, it doesn’t matter what the row height is, the image can stretch to match.
You can also do something similar to what Matt has done here with a gradient layer