I added a custom background image to my UITableView and it looks great. Than I removed any background color from the cells. Now I expect to see the text of only cells on top of the background image of the table, however, I see strange behavior. The cells take the color pattern of the background image of the table, so that I can see the waves, as in the picture:

The shell of the background image is as follows:

* Pay attention to the white circles that disappear under the cells!
My code is as follows: in viewDidLoad I sets the background image of the table view:
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"general_bg.png"]];
For each cell, I remove any background color as follows:
UIView *bckView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease]; bckView.backgroundColor = [UIColor clearColor]; cell.backgroundView = bckView; cell.backgoundColor = [UIColor clearColor]; cell.contentView.backgroundColor = [UIColor clearColor]; UILabel *textLabel = [[UILabel alloc] initWithFrame:CGRectMake(x,y,x1,y1)]; textLabel.backgroundColor = [UIColor clearColor]; [cell.contentView addSubview:textLabel];
- line separators are custom images added to cells.
source share