Thornaci Thornaci - 19 days ago 5x
iOS Question

UITableView background image for all cells

I want to change my tableview background image. When i change it, the change doesn't effect the cells. I'm using xib for my cells which doesn't have any code inside it, just design. So how can i solve this?

self.list.backgroundView = [[UIImageView alloc] initWithImage:
[UIImage imageNamed:@"Pattern.png"]];



In your cellForRowAtIndexPath method, set your cell's background color to clear color. It will make your cells transparent and show the background image.

Objective C:

cell.backgroundColor = [UIColor clearColor];


cell.backgroundColor = UIColor.clearColor()