I have been all over the place, seems the UITableView
with a static background issue is well documented, but no one with a straight forward solution?
Im building my
You need to set up your controller as a UIViewController
, not a UITableViewController
. Then add the tableview
programmatically above a background imageView
.
@interface SomeController : UIViewController {
...
UITableView *tableView;
...
}
@property (nonatomic, retain) UITableView *tableView;
@end
@implementation SomeController
@synthesize tableView;
...
- (void)loadView {
[super loadView];
UIImageView *v = [[[UIImageView alloc] initWithFrame:self.view.bounds] autorelease];
[v setImage:[UIImage imageNamed:@"table_background.png"]];
[self.view addSubview:v];
self.tableView = [[[UITableView alloc] initWithFrame:self.view.bounds] autorelease];
[self.tableView setBackgroundColor:[UIColor clearColor]];
[self.view addSubview:self.tableView];
}
...
@end