Reputation: 2834
I have a UITableViewController. In viewDidLoad, I do the following:
self.tableView.backgroundColor = [UIColor clearColor];
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_cafe.png"]];
The background is supposed to be a gradient. Two issues:
I've experimented with setting the UITableCell's opacity to NO, but that doesn't worked. I have read these threads already: Transparent background in grouped UITableView - iPhone, and Black corners around UITableViewCells.
I'm not using Interface Builder at all for this.
Example:
Upvotes: 0
Views: 192
Reputation: 26683
Make a UIView with that pattern image as background color and set it as table view's background view.
UIView *bgView = [[UIView alloc] initWithFrame:self.tableView.frame];
bgView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_cafe.png"]];
self.tableView.backgroundView = bgView;
[bgView release];
Upvotes: 1