views:

40

answers:

1

I want to have a background image behind my UITableView. This works fine, but for each grouped UITableView it seems to be using my background image. I just want it to use the background image once:

Note: This is all inside of a UITableViewController class

self.view.backgroundColor = [[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]]autorelease];
    self.tableView.opaque = NO;
    self.tableView.backgroundView = nil;
    headerView.backgroundColor = [UIColor clearColor];
    footerView.backgroundColor = [UIColor clearColor];
A: 

You need to do two things:

Set background view (color) not in the UITableViewController, but in his parent (UINavigationController most likely, right?)

self.parentViewController.view.backgroundColor = [UIColor redColor]; // or whatever your image is

Set clear color for tableView background color (and optionally for its separatorColor)

self.tableView.separatorColor = [UIColor clearColor];
self.tableView.backgroundColor = [UIColor clearColor];
sha